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

Commit 1f573383 authored by Wale Ogunwale's avatar Wale Ogunwale
Browse files

Don't acquire WM service lock in ActivityStackSupervisor.resolveIntent()

The lock isn't really needed in this method since it doesn't touch any
internal state to the service. This helps us avoid a deadlock where
package manager calls back in AMS.

Change-Id: I73ba11c11f91fbd671d5a8775d31afb48eebca9d
Fixes: 120113767
Test: N/A
parent 122c0879
Loading
Loading
Loading
Loading
+19 −21
Original line number Diff line number Diff line
@@ -662,7 +662,6 @@ public class ActivityStackSupervisor implements RecentTasks.Callbacks {

    ResolveInfo resolveIntent(Intent intent, String resolvedType, int userId, int flags,
            int filterCallingUid) {
        synchronized (mService.mGlobalLock) {
        try {
            Trace.traceBegin(TRACE_TAG_ACTIVITY_MANAGER, "resolveIntent");
            int modifiedFlags = flags
@@ -688,7 +687,6 @@ public class ActivityStackSupervisor implements RecentTasks.Callbacks {
            Trace.traceEnd(TRACE_TAG_ACTIVITY_MANAGER);
        }
    }
    }

    ActivityInfo resolveActivity(Intent intent, String resolvedType, int startFlags,
            ProfilerInfo profilerInfo, int userId, int filterCallingUid) {