summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/allapps
diff options
context:
space:
mode:
authorTony Wickham <twickham@google.com>2018-05-21 13:13:58 -0700
committerTony Wickham <twickham@google.com>2018-05-21 16:01:49 -0700
commit52c1b66f46eb4764825f87d4be07c62cd650935c (patch)
tree67b91f059d2232d935c94e9543cf271afe036a41 /src/com/android/launcher3/allapps
parent1b74bd652cb4fa8e09590d8aeaaf8a7ff0f92888 (diff)
downloadandroid_packages_apps_Trebuchet-52c1b66f46eb4764825f87d4be07c62cd650935c.tar.gz
android_packages_apps_Trebuchet-52c1b66f46eb4764825f87d4be07c62cd650935c.tar.bz2
android_packages_apps_Trebuchet-52c1b66f46eb4764825f87d4be07c62cd650935c.zip
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
Diffstat (limited to 'src/com/android/launcher3/allapps')
-rw-r--r--src/com/android/launcher3/allapps/DiscoveryBounce.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/com/android/launcher3/allapps/DiscoveryBounce.java b/src/com/android/launcher3/allapps/DiscoveryBounce.java
index deaf8d3c1..e1cd06a8b 100644
--- a/src/com/android/launcher3/allapps/DiscoveryBounce.java
+++ b/src/com/android/launcher3/allapps/DiscoveryBounce.java
@@ -84,6 +84,14 @@ public class DiscoveryBounce extends AbstractFloatingView {
}
@Override
+ public boolean onBackPressed() {
+ super.onBackPressed();
+ // Go back to the previous state (from a user's perspective this floating view isn't
+ // something to go back from).
+ return false;
+ }
+
+ @Override
public boolean onControllerInterceptTouchEvent(MotionEvent ev) {
handleClose(false);
return false;