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

Commit 9c09066f authored by Vishnu Nair's avatar Vishnu Nair
Browse files

[wm] Drop no focused window ANR request if the activity is stopped

If the activity is in stopped state it will not have a visible
window on screen. In this case drop any ANR request which tries to
blame the app if it's focused without a window. This can happen on
some products which do not have a focused system window when the
display is turned off.

Test: turn of display, send keyevent
Bug: 236763025

Change-Id: I773bcd9b3448654705cdad224ea4426f9545f3cf
parent c949bea2
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -81,6 +81,10 @@ class AnrController {
                    Slog.e(TAG_WM, "Unknown app appToken:" + applicationHandle.name
                            + ". Dropping notifyNoFocusedWindowAnr request");
                    return;
                } else if (activity.mAppStopped) {
                    Slog.d(TAG_WM, "App is in stopped state:" + applicationHandle.name
                            + ". Dropping notifyNoFocusedWindowAnr request");
                    return;
                }

                // App is unresponsive, but we are actively trying to give focus to a window.