summaryrefslogtreecommitdiffstats
path: root/src/com/android
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2016-06-22 16:29:24 -0700
committerSunny Goyal <sunnygoyal@google.com>2016-07-06 11:46:36 -0700
commitd8d19938e41a5aa5d14da390f3beae154692bc46 (patch)
treef28afe4e380d1d2b40bf48774765965d1f67a7a9 /src/com/android
parent8a4bb334726a1e065ccd5168494bfa41f68d88ff (diff)
downloadandroid_packages_apps_Trebuchet-d8d19938e41a5aa5d14da390f3beae154692bc46.tar.gz
android_packages_apps_Trebuchet-d8d19938e41a5aa5d14da390f3beae154692bc46.tar.bz2
android_packages_apps_Trebuchet-d8d19938e41a5aa5d14da390f3beae154692bc46.zip
Fixing accessibility drag and drop
Since the page's accessibility flag is updated when entering drag mode, it does not need to be updated on state change Bug: 29581071 Change-Id: I1a876b4e8530601cb9bf25d097ea37780b525610
Diffstat (limited to 'src/com/android')
-rw-r--r--src/com/android/launcher3/Workspace.java27
1 files changed, 15 insertions, 12 deletions
diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java
index 9366c420f..73472642e 100644
--- a/src/com/android/launcher3/Workspace.java
+++ b/src/com/android/launcher3/Workspace.java
@@ -2088,19 +2088,22 @@ public class Workspace extends PagedView
}
public void updateAccessibilityFlags() {
- if (Utilities.ATLEAST_LOLLIPOP) {
- int total = getPageCount();
- for (int i = numCustomPages(); i < total; i++) {
- updateAccessibilityFlags((CellLayout) getPageAt(i), i);
- }
- setImportantForAccessibility((mState == State.NORMAL || mState == State.OVERVIEW)
- ? IMPORTANT_FOR_ACCESSIBILITY_AUTO
- : IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS);
- } else {
- int accessible = mState == State.NORMAL ?
- IMPORTANT_FOR_ACCESSIBILITY_AUTO :
+ // TODO: Update the accessibility flags appropriately when dragging.
+ if (!mLauncher.getAccessibilityDelegate().isInAccessibleDrag()) {
+ if (Utilities.ATLEAST_LOLLIPOP) {
+ int total = getPageCount();
+ for (int i = numCustomPages(); i < total; i++) {
+ updateAccessibilityFlags((CellLayout) getPageAt(i), i);
+ }
+ setImportantForAccessibility((mState == State.NORMAL || mState == State.OVERVIEW)
+ ? IMPORTANT_FOR_ACCESSIBILITY_AUTO
+ : IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS);
+ } else {
+ int accessible = mState == State.NORMAL ?
+ IMPORTANT_FOR_ACCESSIBILITY_AUTO :
IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS;
- setImportantForAccessibility(accessible);
+ setImportantForAccessibility(accessible);
+ }
}
}