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

Commit dee45927 authored by Mohamad Mahmoud's avatar Mohamad Mahmoud
Browse files

Call getPid after taking the ActivityManagerService lock to avoid thread

visibility issues

Change-Id: Ic20e1ea43f7e2983d141e43943929ed051c975f8
Bug: 272487164
Test: unit tests
parent d8f5c261
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -318,11 +318,13 @@ class ProcessErrorStateRecord {
        }

        final boolean isSilentAnr;
        final int pid = mApp.getPid();
        final int pid;
        final UUID errorId;
        latencyTracker.waitingOnAMSLockStarted();
        synchronized (mService) {
            latencyTracker.waitingOnAMSLockEnded();
            // Get the process's pid after obtaining the global lock.
            pid = mApp.getPid();
            // Store annotation here as instance above will not be hit on all paths.
            setAnrAnnotation(annotation);