From 87ac02f5fec6af20f34a8cf6e92118a6f2e8e770 Mon Sep 17 00:00:00 2001 From: Mady Mellor Date: Wed, 16 Feb 2022 14:06:52 -0800 Subject: [PATCH] Fix NPE with overflow expanded view I made it so that the overflow expanded view could return null and didn't protect this access of it. Fix is to check if the view is null before doing something to it. Test: treehugger Bug: 219491953 Change-Id: I380584223ad56c754cf59c63e3eb2131c3275154 --- .../Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java index 9219baa061571..c6a68dc98da6d 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java @@ -1237,7 +1237,7 @@ public class BubbleStackView extends FrameLayout b.getExpandedView().updateFontSize(); } } - if (mBubbleOverflow != null) { + if (mBubbleOverflow != null && mBubbleOverflow.getExpandedView() != null) { mBubbleOverflow.getExpandedView().updateFontSize(); } }