Skip to content

Commit

Permalink
feat: 支持插件动态向宿主申请权限
Browse files Browse the repository at this point in the history
  • Loading branch information
RugerMcCarthy committed Jan 24, 2021
1 parent 73bd871 commit 22fa9ec
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,15 @@ protected class PluginPackageManager extends PackageManager {

protected PackageManager mHostPackageManager = mHostContext.getPackageManager();

public Intent buildRequestPermissionsIntent(@NonNull String[] permissions) {
try {
return Reflector.on(PackageManager.class).bind(mHostPackageManager).method("buildRequestPermissionsIntent", String[].class).call((Object)permissions);
} catch (Reflector.ReflectedException e) {
e.printStackTrace();
}
return null;
}

@Override
public PackageInfo getPackageInfo(String packageName, int flags) throws NameNotFoundException {

Expand Down

0 comments on commit 22fa9ec

Please sign in to comment.