private static final IPackageManager PACKAGE_MANAGER = IPackageManager.Stub.asInterface(
new ShizukuBinderWrapper(SystemServiceHelper.getSystemService("package")));
public static void grantRuntimePermission(String packageName, String permissionName, int userId) {
try {
PACKAGE_MANAGER.grantRuntimePermission(packageName, permissionName, userId);
} catch (RemoteException tr) {
throw new RuntimeException(tr.getMessage(), tr);
}
}`
private static final IPackageManager PACKAGE_MANAGER = IPackageManager.Stub.asInterface( new ShizukuBinderWrapper(SystemServiceHelper.getSystemService("package")));
public static void grantRuntimePermission(String packageName, String permissionName, int userId) { try { PACKAGE_MANAGER.grantRuntimePermission(packageName, permissionName, userId); } catch (RemoteException tr) { throw new RuntimeException(tr.getMessage(), tr); } }`