diff options
Diffstat (limited to 'src/com/android/launcher3/Workspace.java')
-rw-r--r-- | src/com/android/launcher3/Workspace.java | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java index 17e59a6d7..08e642948 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 @@ -4334,8 +4342,9 @@ public class Workspace extends PagedView updates.contains(info)) { ShortcutInfo si = (ShortcutInfo) info; BubbleTextView shortcut = (BubbleTextView) v; - boolean oldPromiseState = getTextViewIcon(shortcut) - instanceof PreloadIconDrawable; + Drawable oldIcon = getTextViewIcon(shortcut); + boolean oldPromiseState = (oldIcon instanceof PreloadIconDrawable) + && ((PreloadIconDrawable) oldIcon).hasNotCompleted(); shortcut.applyFromShortcutInfo(si, mIconCache, si.isPromise() != oldPromiseState); |