summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Tryshev <vadimt@google.com>2015-08-12 17:37:15 (GMT)
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-08-12 17:37:15 (GMT)
commit56c3248341685027ad2578e60e10b879b4397272 (patch)
tree40aa06932388ae530991162900fd5f85872f1180
parenta09130b307796a7c2428cb3e2a250c0028ce51c8 (diff)
parentcc436d5d95af1aff9d486ce25f7965d159f871bb (diff)
downloadandroid_packages_apps_Trebuchet-56c3248341685027ad2578e60e10b879b4397272.zip
android_packages_apps_Trebuchet-56c3248341685027ad2578e60e10b879b4397272.tar.gz
android_packages_apps_Trebuchet-56c3248341685027ad2578e60e10b879b4397272.tar.bz2
Merge "Fixing crash upon cancellation of an accessible drag." into ub-launcher3-burnaby
-rw-r--r--src/com/android/launcher3/Workspace.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java
index e83ef7c..08e6429 100644
--- a/src/com/android/launcher3/Workspace.java
+++ b/src/com/android/launcher3/Workspace.java
@@ -887,6 +887,9 @@ public class Workspace extends PagedView
}
}
+ LauncherAccessibilityDelegate delegate =
+ LauncherAppState.getInstance().getAccessibilityDelegate();
+
// We enforce at least one page to add new items to. In the case that we remove the last
// such screen, we convert the last screen to the empty screen
int minScreens = 1 + numCustomPages();
@@ -901,6 +904,11 @@ public class Workspace extends PagedView
if (indexOfChild(cl) < currentPage) {
pageShift++;
}
+
+ if (delegate != null && delegate.isInAccessibleDrag()) {
+ cl.enableAccessibleDrag(false, CellLayout.WORKSPACE_ACCESSIBILITY_DRAG);
+ }
+
removeView(cl);
} else {
// if this is the last non-custom content screen, convert it to the empty screen