Loading quickstep/src/com/android/launcher3/uioverrides/OverviewState.java +2 −1 Original line number Diff line number Diff line Loading @@ -29,7 +29,8 @@ import com.android.quickstep.RecentsView; */ public class OverviewState extends LauncherState { private static final int STATE_FLAGS = FLAG_SHOW_SCRIM | FLAG_MULTI_PAGE; private static final int STATE_FLAGS = FLAG_SHOW_SCRIM | FLAG_MULTI_PAGE | FLAG_WORKSPACE_ICONS_CAN_BE_DRAGGED; public OverviewState(int id) { super(id, ContainerType.WORKSPACE, OVERVIEW_TRANSITION_MS, 1f, STATE_FLAGS); Loading src/com/android/launcher3/LauncherState.java +8 −1 Original line number Diff line number Diff line Loading @@ -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); Loading Loading @@ -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; Loading @@ -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; Loading src/com/android/launcher3/Workspace.java +1 −1 Original line number Diff line number Diff line Loading @@ -1407,7 +1407,7 @@ public class Workspace extends PagedView /** Returns whether a drag should be allowed to be started from the current workspace state. */ public boolean workspaceIconsCanBeDragged() { return mLauncher.isInState(NORMAL) || mLauncher.isInState(SPRING_LOADED); return mLauncher.getStateManager().getState().workspaceIconsCanBeDragged; } private void updateChildrenLayersEnabled() { Loading src/com/android/launcher3/states/SpringLoadedState.java +1 −1 Original line number Diff line number Diff line Loading @@ -35,7 +35,7 @@ import com.android.launcher3.userevent.nano.LauncherLogProto.ContainerType; public class SpringLoadedState extends LauncherState { private static final int STATE_FLAGS = FLAG_SHOW_SCRIM | FLAG_MULTI_PAGE | FLAG_DISABLE_ACCESSIBILITY | FLAG_DO_NOT_RESTORE; FLAG_DISABLE_ACCESSIBILITY | FLAG_DO_NOT_RESTORE | FLAG_WORKSPACE_ICONS_CAN_BE_DRAGGED; // Determines how long to wait after a rotation before restoring the screen orientation to // match the sensor state. Loading Loading
quickstep/src/com/android/launcher3/uioverrides/OverviewState.java +2 −1 Original line number Diff line number Diff line Loading @@ -29,7 +29,8 @@ import com.android.quickstep.RecentsView; */ public class OverviewState extends LauncherState { private static final int STATE_FLAGS = FLAG_SHOW_SCRIM | FLAG_MULTI_PAGE; private static final int STATE_FLAGS = FLAG_SHOW_SCRIM | FLAG_MULTI_PAGE | FLAG_WORKSPACE_ICONS_CAN_BE_DRAGGED; public OverviewState(int id) { super(id, ContainerType.WORKSPACE, OVERVIEW_TRANSITION_MS, 1f, STATE_FLAGS); Loading
src/com/android/launcher3/LauncherState.java +8 −1 Original line number Diff line number Diff line Loading @@ -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); Loading Loading @@ -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; Loading @@ -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; Loading
src/com/android/launcher3/Workspace.java +1 −1 Original line number Diff line number Diff line Loading @@ -1407,7 +1407,7 @@ public class Workspace extends PagedView /** Returns whether a drag should be allowed to be started from the current workspace state. */ public boolean workspaceIconsCanBeDragged() { return mLauncher.isInState(NORMAL) || mLauncher.isInState(SPRING_LOADED); return mLauncher.getStateManager().getState().workspaceIconsCanBeDragged; } private void updateChildrenLayersEnabled() { Loading
src/com/android/launcher3/states/SpringLoadedState.java +1 −1 Original line number Diff line number Diff line Loading @@ -35,7 +35,7 @@ import com.android.launcher3.userevent.nano.LauncherLogProto.ContainerType; public class SpringLoadedState extends LauncherState { private static final int STATE_FLAGS = FLAG_SHOW_SCRIM | FLAG_MULTI_PAGE | FLAG_DISABLE_ACCESSIBILITY | FLAG_DO_NOT_RESTORE; FLAG_DISABLE_ACCESSIBILITY | FLAG_DO_NOT_RESTORE | FLAG_WORKSPACE_ICONS_CAN_BE_DRAGGED; // Determines how long to wait after a rotation before restoring the screen orientation to // match the sensor state. Loading