commit | 99e5c70ff088cb92833dfbeb98ffb905f71b7c3b | [log] [tgz] |
---|---|---|
author | Riddle Hsu <riddlehsu@google.com> | Thu Aug 12 09:50:46 2021 +0000 |
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | Thu Aug 12 09:50:46 2021 +0000 |
tree | 276923319f5f16cd72f9a06f729fbf19d8925344 | |
parent | a4d60ac1eec88b2562f83386b00a564b6e040349 [diff] | |
parent | 895d981852219cd087605f6ac2b04beb876a863d [diff] |
Merge "Avoid the scenario where Contexts list filled with null value in ShowAnrDialogs()"
diff --git a/services/core/java/com/android/server/wm/WindowProcessController.java b/services/core/java/com/android/server/wm/WindowProcessController.java index e6a35f1..1f8a437 100644 --- a/services/core/java/com/android/server/wm/WindowProcessController.java +++ b/services/core/java/com/android/server/wm/WindowProcessController.java
@@ -908,7 +908,7 @@ final int displayId = r.getDisplayId(); final Context c = root.getDisplayUiContext(displayId); - if (r.mVisibleRequested && !displayContexts.contains(c)) { + if (c != null && r.mVisibleRequested && !displayContexts.contains(c)) { displayContexts.add(c); } }