commit | 5786c559c94c3260518a95fe88262a3627a9baa2 | [log] [tgz] |
---|---|---|
author | Varun Shah <varunshah@google.com> | Sat May 04 03:41:25 2024 +0000 |
committer | Varun Shah <varunshah@google.com> | Sat May 04 03:41:29 2024 +0000 |
tree | fc759fc15604cdb1bcffa0380163cbc511b9f6ec | |
parent | d34801c171c13bf2354e5bc587e50fbae8e9cc0a [diff] |
Don't throw ANR if service is not running. Change-Id: I92a29451cdaa562a322891cef75fa81c7bc82dfc Fixes: 338670878 Test: atest CtsFgsTimeoutTestCases
diff --git a/services/core/java/com/android/server/am/ActiveServices.java b/services/core/java/com/android/server/am/ActiveServices.java index ec0d897..ce80ea7 100644 --- a/services/core/java/com/android/server/am/ActiveServices.java +++ b/services/core/java/com/android/server/am/ActiveServices.java
@@ -3930,7 +3930,9 @@ Slog.e(TAG_SERVICE, "FGS ANR'ed: " + sr); traceInstant("FGS ANR: ", sr); - mAm.appNotResponding(sr.app, tr); + if (sr.app != null) { + mAm.appNotResponding(sr.app, tr); + } // TODO: Can we close the ANR dialog here, if it's still shown? Currently, the ANR // dialog really doesn't remember the "cause" (especially if there have been multiple