Commits

Robert Craig committed 0b85db8

Fix EOPS use with multi-user.

Need to ensure that the uid of the
correct caller is in place when
calling into pm.

Comments (0)

Files changed (1)

services/java/com/android/server/AppOpsService.java

         }
 
         SparseArray<Op> lockedOps = null;
+        long callingId = Binder.clearCallingIdentity();
         try {
             PackageManager pm = mContext.getPackageManager();
             String se = (pm.getApplicationInfo(packageName, 0)).seinfo;
             lockedOps = mLockedPolicy.get(se);
         } catch (NameNotFoundException e) {
-            return pkgOps;
+        } finally {
+            Binder.restoreCallingIdentity(callingId);
         }
 
         if (lockedOps == null) {