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

Commit e4204fa0 authored by Tony Mak's avatar Tony Mak Committed by android-build-merger
Browse files

[automerger] clearCallingIdentity before calling into getPackageUidAsUser am:...

[automerger] clearCallingIdentity before calling into getPackageUidAsUser am: 857326e3 am: b1f28485 am: 884d2c73 am: 6a42ea18 am: 42ded39d am: fb67a0f5 am: 2cb239cf am: 8914d11b am: 675ad120
am: ed2d7b7d

Change-Id: Ibfff2e78a363925207bd6ea0364aa494f99fe6b3
parents 775b8adf ed2d7b7d
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -4532,11 +4532,14 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub {
        }

        private boolean isValidPackageForUid(String packageName, int uid) {
            final long token = Binder.clearCallingIdentity();
            try {
                return uid == mPackageManager.getPackageUid(
                        packageName, UserHandle.getUserId(uid));
            } catch (PackageManager.NameNotFoundException e) {
                return false;
            } finally {
                Binder.restoreCallingIdentity(token);
            }
        }