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

Commit ca58d80f authored by Svet Ganov's avatar Svet Ganov
Browse files

Clear binder identity when grantint permisisons to carrier apps

bug:22204562

Change-Id: I79dc2e102d227c991adc849e1cbda8572ee14905
parent 2438c9b2
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -15990,8 +15990,13 @@ public class PackageManagerService extends IPackageManager.Stub {
    public void grantDefaultPermissionsToEnabledCarrierApps(String[] packageNames, int userId) {
        enforceSystemOrPhoneCaller("grantPermissionsToEnabledCarrierApps");
        synchronized (mPackages) {
            final long identity = Binder.clearCallingIdentity();
            try {
                mDefaultPermissionPolicy.grantDefaultPermissionsToEnabledCarrierAppsLPr(
                        packageNames, userId);
            } finally {
                Binder.restoreCallingIdentity(identity);
            }
        }
    }