From 1a916f5b1aab2b7c5e3907e3e08521ea355ded2c Mon Sep 17 00:00:00 2001 From: Mady Mellor Date: Thu, 27 May 2021 15:50:45 -0700 Subject: [PATCH] Hide the stack education view when user taps This was only hiding if you interacted with the bubble, now it will hide if you tap anywhere. Also makes sure the bubbles are ordered above the education. Bug: 189225662 Test: manual - wipe device, get first bubble, tap anywhere other than the bubble & observe that the user education fades away. Change-Id: I3750ca79de717e81492070b38d1af0518f1a7a3f --- .../src/com/android/wm/shell/bubbles/BubbleStackView.java | 3 +++ 1 file changed, 3 insertions(+) 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 c6a9c108135f7..5627b9fcdfd39 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 @@ -938,6 +938,8 @@ public class BubbleStackView extends FrameLayout if (ev.getAction() == MotionEvent.ACTION_DOWN) { if (mShowingManage) { showManageMenu(false /* show */); + } else if (mStackEduView != null && mStackEduView.getVisibility() == VISIBLE) { + mStackEduView.hide(false); } else if (mBubbleData.isExpanded()) { mBubbleData.setExpanded(false); } @@ -1152,6 +1154,7 @@ public class BubbleStackView extends FrameLayout mStackEduView = new StackEducationView(mContext); addView(mStackEduView); } + mBubbleContainer.bringToFront(); return mStackEduView.show(mPositioner.getDefaultStartPosition()); }