summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/LauncherState.java
diff options
context:
space:
mode:
authorTony Wickham <twickham@google.com>2018-03-20 14:13:16 -0700
committerTony Wickham <twickham@google.com>2018-03-20 14:18:34 -0700
commit76cf236596d395d6936d37208bd99e46f89b4893 (patch)
treea2e58baae8ab496162091d4faac4cc5c5237b694 /src/com/android/launcher3/LauncherState.java
parentada91b94ab9d4daeff3937e9884e8519562531e1 (diff)
downloadandroid_packages_apps_Trebuchet-76cf236596d395d6936d37208bd99e46f89b4893.tar.gz
android_packages_apps_Trebuchet-76cf236596d395d6936d37208bd99e46f89b4893.tar.bz2
android_packages_apps_Trebuchet-76cf236596d395d6936d37208bd99e46f89b4893.zip
Hide back button in drag-n-drop and quick scrub
Add a state flag to hide the back button, used by NORMAL, SPRING_LOADED, and FAST_OVERVIEW states. Bug: 74390697 Change-Id: Ifdb2aa41691db4594ea597fc5b5839967711b43d
Diffstat (limited to 'src/com/android/launcher3/LauncherState.java')
-rw-r--r--src/com/android/launcher3/LauncherState.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/com/android/launcher3/LauncherState.java b/src/com/android/launcher3/LauncherState.java
index 9fef64ae1..d5a212091 100644
--- a/src/com/android/launcher3/LauncherState.java
+++ b/src/com/android/launcher3/LauncherState.java
@@ -60,6 +60,7 @@ public class LauncherState {
protected static final int FLAG_ALL_APPS_SCRIM = 1 << 7;
protected static final int FLAG_DISABLE_INTERACTION = 1 << 8;
protected static final int FLAG_OVERVIEW_UI = 1 << 9;
+ protected static final int FLAG_HIDE_BACK_BUTTON = 1 << 10;
protected static final PageAlphaProvider DEFAULT_ALPHA_PROVIDER =
new PageAlphaProvider(ACCEL_2) {
@@ -75,7 +76,7 @@ public class LauncherState {
* TODO: Create a separate class for NORMAL state.
*/
public static final LauncherState NORMAL = new LauncherState(0, ContainerType.WORKSPACE,
- 0, FLAG_DISABLE_RESTORE | FLAG_WORKSPACE_ICONS_CAN_BE_DRAGGED);
+ 0, FLAG_DISABLE_RESTORE | FLAG_WORKSPACE_ICONS_CAN_BE_DRAGGED | FLAG_HIDE_BACK_BUTTON);
/**
* Various Launcher states arranged in the increasing order of UI layers
@@ -140,6 +141,12 @@ public class LauncherState {
*/
public final boolean overviewUi;
+ /**
+ * True if the back button should be hidden when in this state (assuming no floating views are
+ * open, launcher has window focus, etc).
+ */
+ public final boolean hideBackButton;
+
public LauncherState(int id, int containerType, int transitionDuration, int flags) {
this.containerType = containerType;
this.transitionDuration = transitionDuration;
@@ -157,6 +164,7 @@ public class LauncherState {
this.disablePageClipping = (flags & FLAG_DISABLE_PAGE_CLIPPING) != 0;
this.disableInteraction = (flags & FLAG_DISABLE_INTERACTION) != 0;
this.overviewUi = (flags & FLAG_OVERVIEW_UI) != 0;
+ this.hideBackButton = (flags & FLAG_HIDE_BACK_BUTTON) != 0;
this.ordinal = id;
sAllStates[id] = this;