commit | 64212c5439dd40204256630dd7c01cf68a02047f | [log] [tgz] |
---|---|---|
author | Jeremy Sim <jeremysim@google.com> | Fri Mar 18 16:55:17 2022 -0700 |
committer | Jeremy Sim <jeremysim@google.com> | Fri Mar 18 16:55:17 2022 -0700 |
tree | 0ffb4e37360835ecb7eb078b7d363db131e9507d | |
parent | f1543cb520a19302b8c4f149ab7b57fbd629e5ed [diff] |
Fix crash condition by adding a null check in DigitalWellBeingToast Fixes a crash condition where TaskView#getRecentsView() could return null when being called from DigitalWellBeingToast#setBanner(), resulting in a crash. Fixes: 217671133 Test: Manual Change-Id: I964384d97d26336e9a5e8e4c025f66ab78c63e0a
diff --git a/quickstep/src/com/android/quickstep/views/DigitalWellBeingToast.java b/quickstep/src/com/android/quickstep/views/DigitalWellBeingToast.java index 27a748d..79b15c7 100644 --- a/quickstep/src/com/android/quickstep/views/DigitalWellBeingToast.java +++ b/quickstep/src/com/android/quickstep/views/DigitalWellBeingToast.java
@@ -306,7 +306,7 @@ private void setBanner(@Nullable View view) { mBanner = view; - if (view != null) { + if (view != null && mTaskView.getRecentsView() != null) { setupAndAddBanner(); setBannerOutline(); }