commit | 54c821eb19d7d1f04dc4ec9663d4c45066be0aba | [log] [tgz] |
---|---|---|
author | Lucas Dupin <dupin@google.com> | Tue Dec 17 11:53:04 2019 -0800 |
committer | Lucas Dupin <dupin@google.com> | Tue Dec 17 20:03:57 2019 +0000 |
tree | 2eb0cb994cd61d3b6676a10f963742fdc7ab083c | |
parent | 9f938a6de1ce18b738e873300d0321312e5e9ada [diff] |
Avoid initialization race condition ScrimController#onColorsChanged might arrive before ScrimController#attachViews, this would cause SysUI to crash loop. Test: atest ScrimControllerTest Test: manual Change-Id: If48cb5f2bfc2251419384e9387590270efe1d787
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java index b8aea9b..4c5bbce 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java
@@ -561,7 +561,7 @@ } protected void scheduleUpdate() { - if (mUpdatePending) return; + if (mUpdatePending || mScrimBehind == null) return; // Make sure that a frame gets scheduled. mScrimBehind.invalidate();