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

Commit 562b9253 authored by Chun-Wei Wang's avatar Chun-Wei Wang Committed by Android (Google) Code Review
Browse files

Merge "getDeviceOwnerDeletedPackageMsg() should call clearCallingIdentity()"

parents dd6945aa 9321e8c9
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -1344,9 +1344,14 @@ public class PackageInstallerService extends IPackageInstaller.Stub implements
        }

        private String getDeviceOwnerDeletedPackageMsg() {
            final long ident = Binder.clearCallingIdentity();
            try {
                DevicePolicyManager dpm = mContext.getSystemService(DevicePolicyManager.class);
                return dpm.getResources().getString(PACKAGE_DELETED_BY_DO,
                        () -> mContext.getString(R.string.package_deleted_device_owner));
            } finally {
                Binder.restoreCallingIdentity(ident);
            }
        }

        @Override