Merge "Update canSilentlyInstallPackage DPMS API for financed device owner" into tm-dev
This commit is contained in:
@@ -13057,9 +13057,11 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager {
|
|||||||
if (callerPackage == null) {
|
if (callerPackage == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CallerIdentity caller = new CallerIdentity(callerUid, null, null);
|
||||||
if (isUserAffiliatedWithDevice(UserHandle.getUserId(callerUid))
|
if (isUserAffiliatedWithDevice(UserHandle.getUserId(callerUid))
|
||||||
&& (isActiveProfileOwner(callerUid)
|
&& (isActiveProfileOwner(callerUid)
|
||||||
|| isActiveDeviceOwner(callerUid))) {
|
|| isDefaultDeviceOwner(caller) || isFinancedDeviceOwner(caller))) {
|
||||||
// device owner or a profile owner affiliated with the device owner
|
// device owner or a profile owner affiliated with the device owner
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user