Refactoring deferred bind logic

> Using ViewTreeObserver to listen for onDraw instead of overriding onDraw in workspace
> Loader passes the list of deferrerd runnables to launcher

Change-Id: Ie4877f746c96e9497396de8089f00f70bf867e17
This commit is contained in:
Sunny Goyal
2015-09-15 10:43:13 -07:00
parent ef246f52c4
commit 527c7d3460
4 changed files with 179 additions and 104 deletions
-15
View File
@@ -278,13 +278,6 @@ public class Workspace extends PagedView
private AccessibilityDelegate mPagesAccessibilityDelegate;
private final Runnable mBindPages = new Runnable() {
@Override
public void run() {
mLauncher.getModel().bindRemainingSynchronousPages();
}
};
/**
* Used to inflate the Workspace from XML.
*
@@ -1718,14 +1711,6 @@ public class Workspace extends PagedView
super.onLayout(changed, left, top, right, bottom);
}
@Override
protected void onDraw(Canvas canvas) {
super.onDraw(canvas);
// Call back to LauncherModel to finish binding after the first draw
post(mBindPages);
}
@Override
protected boolean onRequestFocusInDescendants(int direction, Rect previouslyFocusedRect) {
if (!mLauncher.isAppsViewVisible()) {