Fixing non-scrolling of workspace view after opening/closing AllApps vew.
The reason for non-scrolling was excluding the pages view from the accessibility hierarchy by marking it as non-important. So, I just removed the code manipulating [non]importance of the PagedView. However, this would make the PagesView accessibility-focusable, which is undesirable. It becomes focusable because it supports long clicks in "normal" mode. Since it doesn't support accessibility long clicks (i.e. Overview mode is fetched NOT via accessibility long-click), I just disabled accessibility long-clickability, which made PageView non-focusable, and it started to behave correctly. Bug: 21281859 Change-Id: I7ab01e5f39cb37c456c961199c27458c9bda1c3d
This commit is contained in:
@@ -327,7 +327,6 @@ public class Workspace extends SmoothPagedView
|
||||
|
||||
// Disable multitouch across the workspace/all apps/customize tray
|
||||
setMotionEventSplittingEnabled(true);
|
||||
setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_YES);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -2019,14 +2018,9 @@ public class Workspace extends SmoothPagedView
|
||||
for (int i = numCustomPages(); i < total; i++) {
|
||||
updateAccessibilityFlags((CellLayout) getPageAt(i), i);
|
||||
}
|
||||
if (mState == State.NORMAL) {
|
||||
setImportantForAccessibility(IMPORTANT_FOR_ACCESSIBILITY_NO);
|
||||
} else {
|
||||
setImportantForAccessibility(IMPORTANT_FOR_ACCESSIBILITY_YES);
|
||||
}
|
||||
} else {
|
||||
int accessible = mState == State.NORMAL ?
|
||||
IMPORTANT_FOR_ACCESSIBILITY_NO :
|
||||
IMPORTANT_FOR_ACCESSIBILITY_AUTO :
|
||||
IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS;
|
||||
setImportantForAccessibility(accessible);
|
||||
}
|
||||
@@ -2045,7 +2039,7 @@ public class Workspace extends SmoothPagedView
|
||||
page.setAccessibilityDelegate(mPagesAccessibilityDelegate);
|
||||
} else {
|
||||
int accessible = mState == State.NORMAL ?
|
||||
IMPORTANT_FOR_ACCESSIBILITY_NO :
|
||||
IMPORTANT_FOR_ACCESSIBILITY_AUTO :
|
||||
IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS;
|
||||
page.setImportantForAccessibility(IMPORTANT_FOR_ACCESSIBILITY_NO);
|
||||
page.getShortcutsAndWidgets().setImportantForAccessibility(accessible);
|
||||
|
||||
Reference in New Issue
Block a user