Protect against NPE thrown by flaky integration test

Bug: 150344903
Test: atest PlatformScenarioTests:android.platform.test.scenario.sysui.bubble.Overflow -s [device] --rerun-until-failure 3
Change-Id: I603ee92a4bc83017d877bde721d1a2f4ccf15fa2
This commit is contained in:
Lyn Han
2020-10-19 17:57:55 -05:00
parent 3882026c40
commit 5ae394be12

View File

@@ -2216,9 +2216,10 @@ public class BubbleStackView extends FrameLayout
}
// Stop suppressing the dot now that the flyout has morphed into the dot.
bubble.getIconView().removeDotSuppressionFlag(
BadgedImageView.SuppressionFlag.FLYOUT_VISIBLE);
if (bubble.getIconView() != null) {
bubble.getIconView().removeDotSuppressionFlag(
BadgedImageView.SuppressionFlag.FLYOUT_VISIBLE);
}
// Hide the stack after a delay, if needed.
updateTemporarilyInvisibleAnimation(false /* hideImmediately */);
};