commit | 446251dc521aa986d7d62d5d119edf14d2219754 | [log] [tgz] |
---|---|---|
author | Mark Renouf <mrenouf@google.com> | Fri Apr 26 10:22:41 2019 -0400 |
committer | Mark Renouf <mrenouf@google.com> | Tue May 07 10:00:07 2019 -0400 |
tree | db894f7ebf3aa2f974b86bbdd2a776a82d4366df | |
parent | e74b7d2365f2783e89671b0e2e57f1e712a95a87 [diff] |
Adds OnBackPressedOnTaskRoot This allows Bubbles to be collapsed instead of finished when there is only one activity in the stack. Bug: 126852149 Test: launch activity, press back Change-Id: Iad8db0549853e3f385d54fc6b6cea5e502d37139
diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java index cff03c9..7d189b2 100644 --- a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java +++ b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java
@@ -719,6 +719,13 @@ mBubbleData.setExpanded(false); } } + + @Override + public void onBackPressedOnTaskRoot(RunningTaskInfo taskInfo) { + if (mStackView != null && taskInfo.displayId == getExpandedDisplayId(mContext)) { + mBubbleData.setExpanded(false); + } + } } private static boolean shouldAutoBubbleMessages(Context context) {