Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 221cc779 authored by Kholoud Mohamed's avatar Kholoud Mohamed Committed by Automerger Merge Worker
Browse files

Merge "Add parameter callerPackage to setApplicationExemptions for metrics...

Merge "Add parameter callerPackage to setApplicationExemptions for metrics test" into udc-dev am: 342bac9d

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/22108004



Change-Id: Ib1ad9a3abbf268f97c0e5a3e75523f2fd80f35bf
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 9a0da5db 342bac9d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -15775,7 +15775,7 @@ public class DevicePolicyManager {
        throwIfParentInstance("setApplicationExemptions");
        if (mService != null) {
            try {
                mService.setApplicationExemptions(packageName,
                mService.setApplicationExemptions(mContext.getPackageName(), packageName,
                        ArrayUtils.convertToIntArray(new ArraySet<>(exemptions)));
            } catch (ServiceSpecificException e) {
                switch (e.errorCode) {
+1 −1
Original line number Diff line number Diff line
@@ -591,7 +591,7 @@ interface IDevicePolicyManager {

    List<UserHandle> getPolicyManagedProfiles(in UserHandle userHandle);

    void setApplicationExemptions(String packageName, in int[]exemptions);
    void setApplicationExemptions(String callerPackage, String packageName, in int[]exemptions);
    int[] getApplicationExemptions(String packageName);

    void setMtePolicy(int flag, String callerPackageName);
+3 −2
Original line number Diff line number Diff line
@@ -19654,7 +19654,8 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
    }
    @Override
    public void setApplicationExemptions(String packageName, int[] exemptions) {
    public void setApplicationExemptions(String callerPackage, String packageName,
            int[] exemptions) {
        if (!mHasFeature) {
            return;
        }
@@ -19665,7 +19666,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
        Preconditions.checkCallAuthorization(
                hasCallingOrSelfPermission(permission.MANAGE_DEVICE_POLICY_APP_EXEMPTIONS));
        final CallerIdentity caller = getCallerIdentity();
        final CallerIdentity caller = getCallerIdentity(callerPackage);
        final ApplicationInfo packageInfo;
        packageInfo = getPackageInfoWithNullCheck(packageName, caller);