Merge "Update canSilentlyInstallPackage DPMS API for financed device owner" into tm-dev am: 7977353cd2
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17949573 Change-Id: I720c4b74e2c5d9a8b578d1d345b06a2798dad447 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
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