Fix NPE where BubbleExpandedView is null when we want to show manage education view

mManageEduView.show() requires a non-null BubbleExpandedView but getExpandedView() is declared as nullable.

Bug: 246824356
Bug: 246902054
Test: manual
Change-Id: I19d733ced80d121c7dab40936721c9cc8be1a12e
This commit is contained in:
Mady Mellor
2022-09-15 11:50:46 -07:00
parent 9a82d5f6c4
commit d0382078ba

View File

@@ -1270,7 +1270,7 @@ public class BubbleStackView extends FrameLayout
}
final boolean seen = getPrefBoolean(ManageEducationViewKt.PREF_MANAGED_EDUCATION);
final boolean shouldShow = (!seen || BubbleDebugConfig.forceShowUserEducation(mContext))
&& mExpandedBubble != null;
&& mExpandedBubble != null && mExpandedBubble.getExpandedView() != null;
if (BubbleDebugConfig.DEBUG_USER_EDUCATION) {
Log.d(TAG, "Show manage edu: " + shouldShow);
}