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:
@@ -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()) {
|
||||
|
||||
Reference in New Issue
Block a user