Allow supressing user education views for bubble bar
Bug: 273994695
Test: Manual
Change-Id: Ibb76c336671bfb8231fc34981f21e90f412debb6
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleEducationController.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleEducationController.kt
index e57f02c..bd47082 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleEducationController.kt
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleEducationController.kt
@@ -40,7 +40,13 @@
/** Whether education view should show for the collapsed stack. */
fun shouldShowStackEducation(bubble: BubbleViewProvider?): Boolean {
- val shouldShow = bubble != null &&
+ if (BubbleDebugConfig.neverShowUserEducation(context)) {
+ logDebug("Show stack edu: never")
+ return false
+ }
+
+ val shouldShow =
+ bubble != null &&
bubble.isConversationBubble && // show education for conversation bubbles only
(!hasSeenStackEducation || BubbleDebugConfig.forceShowUserEducation(context))
logDebug("Show stack edu: $shouldShow")
@@ -49,7 +55,13 @@
/** Whether the educational view should show for the expanded view "manage" menu. */
fun shouldShowManageEducation(bubble: BubbleViewProvider?): Boolean {
- val shouldShow = bubble != null &&
+ if (BubbleDebugConfig.neverShowUserEducation(context)) {
+ logDebug("Show manage edu: never")
+ return false
+ }
+
+ val shouldShow =
+ bubble != null &&
bubble.isConversationBubble && // show education for conversation bubbles only
(!hasSeenManageEducation || BubbleDebugConfig.forceShowUserEducation(context))
logDebug("Show manage edu: $shouldShow")