diff options
author | Derek Prothro <dprothro@google.com> | 2014-01-17 13:43:50 -0500 |
---|---|---|
committer | Derek Prothro <dprothro@google.com> | 2014-01-30 15:55:48 -0500 |
commit | dadd984a891a574cebf3dfd38a454a0e6a4228b3 (patch) | |
tree | b649811e2ff156c847e8112c3481639ea36401e3 /src/com/android | |
parent | 947ef4e7ab4cc303fc708ee45a241969ca7ebbdc (diff) | |
download | android_packages_apps_Trebuchet-dadd984a891a574cebf3dfd38a454a0e6a4228b3.tar.gz android_packages_apps_Trebuchet-dadd984a891a574cebf3dfd38a454a0e6a4228b3.tar.bz2 android_packages_apps_Trebuchet-dadd984a891a574cebf3dfd38a454a0e6a4228b3.zip |
Fix black flash during rotation of -1 screen with GEL.
We need to make sure the custom content is adding synchronously
while the rest of the workspace is being created. If we wait
for it to be added in a separate run task, we see a black
flash during rotation.
Also rename a few methods and remove obsolete methods.
Bug: 11802691
Change-Id: I3f6500aa1fabe68cef59ad8c764877f954986a99
Diffstat (limited to 'src/com/android')
-rw-r--r-- | src/com/android/launcher3/Launcher.java | 27 | ||||
-rw-r--r-- | src/com/android/launcher3/Workspace.java | 4 |
2 files changed, 9 insertions, 22 deletions
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java index 709f4cf53..86b4f9460 100644 --- a/src/com/android/launcher3/Launcher.java +++ b/src/com/android/launcher3/Launcher.java @@ -505,11 +505,11 @@ public class Launcher extends Activity } /** - * To be overridden by subclasses to create the custom content and call + * To be overridden by subclasses to populate the custom content container and call * {@link #addToCustomContentPage}. This will only be invoked if * {@link #hasCustomContentToLeft()} is {@code true}. */ - protected void addCustomContentToLeft() { + protected void populateCustomContentContainer() { } /** @@ -539,8 +539,8 @@ public class Launcher extends Activity if (!mWorkspace.hasCustomContent() && hasCustomContentToLeft()) { // Create the custom content page and call the subclass to populate it. - mWorkspace.createCustomContentPage(); - addCustomContentToLeft(); + mWorkspace.createCustomContentContainer(); + populateCustomContentContainer(); } else if (mWorkspace.hasCustomContent() && !hasCustomContentToLeft()) { mWorkspace.removeCustomContentPage(); } @@ -1033,12 +1033,6 @@ public class Launcher extends Activity } } - protected void onFinishBindingItems() { - if (mWorkspace != null && hasCustomContentToLeft() && mWorkspace.hasCustomContent()) { - addCustomContentToLeft(); - } - } - QSBScroller mQsbScroller = new QSBScroller() { int scrollY = 0; @@ -3788,9 +3782,9 @@ public class Launcher extends Activity // Create the custom content page (this call updates mDefaultScreen which calls // setCurrentPage() so ensure that all pages are added before calling this). - // The actual content of the custom page will be added during onFinishBindingItems(). - if (!mWorkspace.hasCustomContent() && hasCustomContentToLeft()) { - mWorkspace.createCustomContentPage(); + if (hasCustomContentToLeft()) { + mWorkspace.createCustomContentContainer(); + populateCustomContentContainer(); } } @@ -4072,13 +4066,6 @@ public class Launcher extends Activity mWorkspace.getUniqueComponents(true, null); mIntentsOnWorkspaceFromUpgradePath = mWorkspace.getUniqueComponents(true, null); } - - mWorkspace.post(new Runnable() { - @Override - public void run() { - onFinishBindingItems(); - } - }); } public boolean isAllAppsButtonRank(int rank) { diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java index 359fd8640..c20677d79 100644 --- a/src/com/android/launcher3/Workspace.java +++ b/src/com/android/launcher3/Workspace.java @@ -421,7 +421,7 @@ public class Workspace extends SmoothPagedView setClipChildren(false); setClipToPadding(false); setChildrenDrawnWithCacheEnabled(true); - + setMinScale(mOverviewModeShrinkFactor); setupLayoutTransition(); @@ -562,7 +562,7 @@ public class Workspace extends SmoothPagedView return screenId; } - public void createCustomContentPage() { + public void createCustomContentContainer() { CellLayout customScreen = (CellLayout) mLauncher.getLayoutInflater().inflate(R.layout.workspace_screen, null); customScreen.disableBackground(); |