Fixing topView not being considered in all places when calculating accessible

and focusable views

Bug: 30563273
Change-Id: I6253ce33ee5c328efdde2ea733029975b31e5eb8
This commit is contained in:
Sunny Goyal
2016-09-02 10:41:43 -07:00
parent 94b510cc68
commit 52851aa3fd
7 changed files with 72 additions and 82 deletions

View File

@@ -1857,19 +1857,6 @@ public class Workspace extends PagedView
}
@Override
protected boolean onRequestFocusInDescendants(int direction, Rect previouslyFocusedRect) {
if (!mLauncher.isAppsViewVisible()) {
final Folder openFolder = getOpenFolder();
if (openFolder != null) {
return openFolder.requestFocus(direction, previouslyFocusedRect);
} else {
return super.onRequestFocusInDescendants(direction, previouslyFocusedRect);
}
}
return false;
}
@Override
public int getDescendantFocusability() {
if (workspaceInModalState()) {
@@ -1878,18 +1865,6 @@ public class Workspace extends PagedView
return super.getDescendantFocusability();
}
@Override
public void addFocusables(ArrayList<View> views, int direction, int focusableMode) {
if (!mLauncher.isAppsViewVisible()) {
final Folder openFolder = getOpenFolder();
if (openFolder != null) {
openFolder.addFocusables(views, direction);
} else {
super.addFocusables(views, direction, focusableMode);
}
}
}
public boolean workspaceInModalState() {
return mState != State.NORMAL;
}