Enable a11y scrolling with item drag

Bug:142300278
Test:Manual
Change-Id: Ieb79dac8a793f5adfe715b1cbe5b7ecae95a26b5
This commit is contained in:
Samuel Fufa committed 2019-11-13 13:22:49 -08:00
1 parent 992cfbf63d
commit 8fb487413c
1 file changed
+6 -2
+6 -2
View File
@@ -1275,6 +1275,10 @@ public class Workspace extends PagedView<WorkspacePageIndicator>
return !mLauncher.isInState(NORMAL);
}
private boolean workspaceInScrollableState() {
return mLauncher.isInState(SPRING_LOADED) || !workspaceInModalState();
}
/** Returns whether a drag should be allowed to be started from the current workspace state. */
public boolean workspaceIconsCanBeDragged() {
return mLauncher.getStateManager().getState().workspaceIconsCanBeDragged;
@@ -2879,7 +2883,7 @@ public class Workspace extends PagedView<WorkspacePageIndicator>
@Override
public boolean scrollLeft() {
boolean result = false;
if (!workspaceInModalState() && !mIsSwitchingState) {
if (!mIsSwitchingState && workspaceInScrollableState()) {
result = super.scrollLeft();
}
Folder openFolder = Folder.getOpen(mLauncher);
@@ -2892,7 +2896,7 @@ public class Workspace extends PagedView<WorkspacePageIndicator>
@Override
public boolean scrollRight() {
boolean result = false;
if (!workspaceInModalState() && !mIsSwitchingState) {
if (!mIsSwitchingState && workspaceInScrollableState()) {
result = super.scrollRight();
}
Folder openFolder = Folder.getOpen(mLauncher);