Go back to previous state when hitting back from discovery bounce
Normally when you hit back, we just close the floating view if there
is one. This makes less sense for DiscoveryBounce, since it doesn't
feel like a different state even though it's technically a floating
view. So in that case, don't consume the back press; let launcher
handle it to go to the previous state.
Bug: 80075741
Change-Id: I7270b61be70509cb2101400a12929478a5d082aa
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index e851499..32539cd 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -1583,8 +1583,8 @@
// by using if-else statements.
UserEventDispatcher ued = getUserEventDispatcher();
AbstractFloatingView topView = AbstractFloatingView.getTopOpenView(this);
- if (topView != null) {
- topView.onBackPressed();
+ if (topView != null && topView.onBackPressed()) {
+ // Handled by the floating view.
} else if (!isInState(NORMAL)) {
LauncherState lastState = mStateManager.getLastState();
ued.logActionCommand(Action.Command.BACK, mStateManager.getState().containerType,