summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTony Wickham <twickham@google.com>2018-03-20 23:06:11 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2018-03-20 23:06:11 +0000
commitc1b6157398c3af353983436ca9e4f4f1f108b221 (patch)
tree88057cc7914c3d0f225c8f768445c28153645ec7 /src
parent1fd6dbeb4ea76e00fa32a837f0306a624a21b3e1 (diff)
parent76cf236596d395d6936d37208bd99e46f89b4893 (diff)
downloadandroid_packages_apps_Trebuchet-c1b6157398c3af353983436ca9e4f4f1f108b221.tar.gz
android_packages_apps_Trebuchet-c1b6157398c3af353983436ca9e4f4f1f108b221.tar.bz2
android_packages_apps_Trebuchet-c1b6157398c3af353983436ca9e4f4f1f108b221.zip
Merge "Hide back button in drag-n-drop and quick scrub" into ub-launcher3-master
Diffstat (limited to 'src')
-rw-r--r--src/com/android/launcher3/LauncherState.java10
-rw-r--r--src/com/android/launcher3/states/SpringLoadedState.java2
2 files changed, 10 insertions, 2 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;
diff --git a/src/com/android/launcher3/states/SpringLoadedState.java b/src/com/android/launcher3/states/SpringLoadedState.java
index 89a9e2d7d..90d3821a3 100644
--- a/src/com/android/launcher3/states/SpringLoadedState.java
+++ b/src/com/android/launcher3/states/SpringLoadedState.java
@@ -35,7 +35,7 @@ public class SpringLoadedState extends LauncherState {
private static final int STATE_FLAGS = FLAG_SHOW_SCRIM | FLAG_MULTI_PAGE |
FLAG_DISABLE_ACCESSIBILITY | FLAG_DISABLE_RESTORE | FLAG_WORKSPACE_ICONS_CAN_BE_DRAGGED |
- FLAG_DISABLE_PAGE_CLIPPING | FLAG_PAGE_BACKGROUNDS;
+ FLAG_DISABLE_PAGE_CLIPPING | FLAG_PAGE_BACKGROUNDS | FLAG_HIDE_BACK_BUTTON;
public SpringLoadedState(int id) {
super(id, ContainerType.OVERVIEW, SPRING_LOADED_TRANSITION_MS, STATE_FLAGS);