OSDN Git Service

Temporarily disable to fix deadlock.
authorJeff Sharkey <jsharkey@android.com>
Tue, 10 Nov 2015 00:50:41 +0000 (16:50 -0800)
committerJeff Sharkey <jsharkey@android.com>
Tue, 10 Nov 2015 00:50:41 +0000 (16:50 -0800)
Bug: 25584022
Change-Id: Icee579cfebfb75c573e9a54622f219e0f81fbd35

services/core/java/com/android/server/pm/PackageManagerService.java

index 09efefa..d7664ab 100644 (file)
@@ -3058,22 +3058,23 @@ public class PackageManagerService extends IPackageManager.Stub {
      * purposefully done before acquiring {@link #mPackages} lock.
      */
     private int augmentFlagsForUser(int flags, int userId) {
-        final IActivityManager am = ActivityManagerNative.getDefault();
-        if (am == null) {
-            // We must be early in boot, so the best we can do is assume the
-            // user is fully running.
-            return flags;
-        }
-        final long token = Binder.clearCallingIdentity();
-        try {
-            if (am.isUserRunning(userId, ActivityManager.FLAG_WITH_AMNESIA)) {
-                flags |= PackageManager.FLAG_USER_RUNNING_WITH_AMNESIA;
-            }
-        } catch (RemoteException e) {
-            throw e.rethrowAsRuntimeException();
-        } finally {
-            Binder.restoreCallingIdentity(token);
-        }
+        // TODO: bring back once locking fixed
+//        final IActivityManager am = ActivityManagerNative.getDefault();
+//        if (am == null) {
+//            // We must be early in boot, so the best we can do is assume the
+//            // user is fully running.
+//            return flags;
+//        }
+//        final long token = Binder.clearCallingIdentity();
+//        try {
+//            if (am.isUserRunning(userId, ActivityManager.FLAG_WITH_AMNESIA)) {
+//                flags |= PackageManager.FLAG_USER_RUNNING_WITH_AMNESIA;
+//            }
+//        } catch (RemoteException e) {
+//            throw e.rethrowAsRuntimeException();
+//        } finally {
+//            Binder.restoreCallingIdentity(token);
+//        }
         return flags;
     }