Suppress error message during getPermissionGrantState()
If called on a non-existent package, simply return PERMISSION_GRANT_STATE_DEFAULT and suppress the error message. Bug: 233826864 Test: builds Change-Id: I6d3074b026415ac39c4f3b9e266b358b65166fe8
This commit is contained in:
@@ -13940,8 +13940,8 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager {
|
||||
granted = PackageManager.PERMISSION_GRANTED;
|
||||
}
|
||||
} catch (NameNotFoundException e) {
|
||||
throw new RemoteException("Cannot check if " + permission
|
||||
+ "is a runtime permission", e, false, true);
|
||||
// Package does not exit
|
||||
return DevicePolicyManager.PERMISSION_GRANT_STATE_DEFAULT;
|
||||
}
|
||||
}
|
||||
int permFlags = mInjector.getPackageManager().getPermissionFlags(
|
||||
|
||||
Reference in New Issue
Block a user