admin管理员组文章数量:1123185
Scenario:
I am using /packages/android_content_provider and I have created a class
public class MyContentProvider extends AndroidContentProvider{
@NonNull
@Override
public String getAuthority() {
return "provider.authority.name";
}
@NonNull
@Override
public String getEntrypointName() {
return "providerEntryPoint";
}
@Override
public boolean onCreate() {
super.onCreate();
System.out.println("SyncProgFlutter: onCreate called");
return true;
}
@Nullable
@Override
public Uri insert(@NonNull Uri uri, @Nullable ContentValues contentValues) {
System.out.println("SyncProgFlutter: insert called with " + uri.toString()
+ " and " + contentValues);
return super.insert(uri, contentValues);
}
}
The onCreate log prints, so that override is working, but the insert log doesn't. Instead, I'm guessing, it just calls insert in the kotlin class because my dart code still gets the call, but I don't get the log. I'd like to override here so I can grant some file permissions to a requesting application. Is this possible?
本文标签: androidHow can I override methods from AndroidContentProvider in my Java codeStack Overflow
版权声明:本文标题:android - How can I override methods from AndroidContentProvider in my Java code? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736553836a1944549.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论