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

Commit 889cec40 authored by Vishnu Nair's avatar Vishnu Nair Committed by Android (Google) Code Review
Browse files

Merge "WM: ANR window pid if activity has no active process"

parents 8e615470 560f41e5
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -6224,15 +6224,15 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
    public boolean inputDispatchingTimedOut(String reason, int windowPid) {
        ActivityRecord anrActivity;
        WindowProcessController anrApp;
        boolean windowFromSameProcessAsActivity;
        boolean blameActivityProcess;
        synchronized (mAtmService.mGlobalLock) {
            anrActivity = getWaitingHistoryRecordLocked();
            anrApp = app;
            windowFromSameProcessAsActivity =
                    !hasProcess() || app.getPid() == windowPid || windowPid == INVALID_PID;
            blameActivityProcess =  hasProcess()
                    && (app.getPid() == windowPid || windowPid == INVALID_PID);
        }

        if (windowFromSameProcessAsActivity) {
        if (blameActivityProcess) {
            return mAtmService.mAmInternal.inputDispatchingTimedOut(anrApp.mOwner,
                    anrActivity.shortComponentName, anrActivity.info.applicationInfo,
                    shortComponentName, app, false, reason);