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

Commit 7bd17ef4 authored by Brian Carlstrom's avatar Brian Carlstrom Committed by android-build-merger
Browse files

Merge "Add null check to InputMonitor.notifyANR" into oc-dev

am: 15010f2b

Change-Id: I95e8ad62dbea783056e14780a4daeba44ff93406
parents 2fd55e29 15010f2b
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1827,7 +1827,8 @@ final class ActivityRecord extends ConfigurationContainer implements AppWindowCo
        synchronized (service) {
            anrActivity = getWaitingHistoryRecordLocked();
            anrApp = app;
            windowFromSameProcessAsActivity = app == null || app.pid == windowPid;
            windowFromSameProcessAsActivity =
                    app == null || app.pid == windowPid || windowPid == -1;
        }
        if (windowFromSameProcessAsActivity) {
            return service.inputDispatchingTimedOut(anrApp, anrActivity, this, false, reason);
+2 −1
Original line number Diff line number Diff line
@@ -259,7 +259,8 @@ final class InputMonitor implements InputManagerService.WindowManagerCallbacks {
            // to abort dispatching or keep waiting.
            final AppWindowContainerController controller = appWindowToken.getController();
            final boolean abort = controller != null
                    && controller.keyDispatchingTimedOut(reason, windowState.mSession.mPid);
                    && controller.keyDispatchingTimedOut(reason,
                            (windowState != null) ? windowState.mSession.mPid : -1);
            if (!abort) {
                // The activity manager declined to abort dispatching.
                // Wait a bit longer and timeout again later.