summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/LauncherState.java
diff options
context:
space:
mode:
authorTony Wickham <twickham@google.com>2017-12-05 10:10:55 -0800
committerTony Wickham <twickham@google.com>2017-12-05 11:40:21 -0800
commit53370678ce0b321dd8bc8d0f55d97c514ba3d37d (patch)
tree2cb2bf054da276c68e26f49a7e0ad68606ee0adb /src/com/android/launcher3/LauncherState.java
parent4018f3df14237adb30c423fee361318cc32673de (diff)
downloadandroid_packages_apps_Trebuchet-53370678ce0b321dd8bc8d0f55d97c514ba3d37d.tar.gz
android_packages_apps_Trebuchet-53370678ce0b321dd8bc8d0f55d97c514ba3d37d.tar.bz2
android_packages_apps_Trebuchet-53370678ce0b321dd8bc8d0f55d97c514ba3d37d.zip
Allow hotseat items to be clicked in overview
Bug: 70179573 Change-Id: Ib2cbd7b12e5e1287d652d703e95c15ca6ea12a4e
Diffstat (limited to 'src/com/android/launcher3/LauncherState.java')
-rw-r--r--src/com/android/launcher3/LauncherState.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/com/android/launcher3/LauncherState.java b/src/com/android/launcher3/LauncherState.java
index d6cd8a35c..01d53dab5 100644
--- a/src/com/android/launcher3/LauncherState.java
+++ b/src/com/android/launcher3/LauncherState.java
@@ -38,11 +38,12 @@ public class LauncherState {
protected static final int FLAG_MULTI_PAGE = 1 << 1;
protected static final int FLAG_DISABLE_ACCESSIBILITY = 1 << 2;
protected static final int FLAG_DO_NOT_RESTORE = 1 << 3;
+ protected static final int FLAG_WORKSPACE_ICONS_CAN_BE_DRAGGED = 1 << 4;
private static final LauncherState[] sAllStates = new LauncherState[4];
public static final LauncherState NORMAL = new LauncherState(0, ContainerType.WORKSPACE,
- 0, 1f, FLAG_DO_NOT_RESTORE);
+ 0, 1f, FLAG_DO_NOT_RESTORE | FLAG_WORKSPACE_ICONS_CAN_BE_DRAGGED);
public static final LauncherState ALL_APPS = new AllAppsState(1);
@@ -88,6 +89,11 @@ public class LauncherState {
*/
public final float verticalProgress;
+ /**
+ * True if the state allows workspace icons to be dragged.
+ */
+ public final boolean workspaceIconsCanBeDragged;
+
public LauncherState(int id, int containerType, int transitionDuration, float verticalProgress,
int flags) {
this.containerType = containerType;
@@ -99,6 +105,7 @@ public class LauncherState {
? IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS
: IMPORTANT_FOR_ACCESSIBILITY_AUTO;
this.doNotRestore = (flags & FLAG_DO_NOT_RESTORE) != 0;
+ this.workspaceIconsCanBeDragged = (flags & FLAG_WORKSPACE_ICONS_CAN_BE_DRAGGED) != 0;
this.verticalProgress = verticalProgress;