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

Commit 3eef5a52 authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

Temporarily disable to fix deadlock.

Bug: 25584022
Change-Id: Icee579cfebfb75c573e9a54622f219e0f81fbd35
parent e17ac156
Loading
Loading
Loading
Loading
+17 −16
Original line number Diff line number Diff line
@@ -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;
    }