Merge "Update canSilentlyInstallPackage DPMS API for financed device owner" into tm-dev am: 7977353cd2 am: fc76e8e403
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17949573 Change-Id: Ia9239eaaf41381ad452ebd6fae485a86c43acf24 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) {
|
||||
return false;
|
||||
}
|
||||
|
||||
CallerIdentity caller = new CallerIdentity(callerUid, null, null);
|
||||
if (isUserAffiliatedWithDevice(UserHandle.getUserId(callerUid))
|
||||
&& (isActiveProfileOwner(callerUid)
|
||||
|| isActiveDeviceOwner(callerUid))) {
|
||||
|| isDefaultDeviceOwner(caller) || isFinancedDeviceOwner(caller))) {
|
||||
// device owner or a profile owner affiliated with the device owner
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user