am 474a3573: Merge "Avoid stripping empty screens if the workspace is still loading (issue 12523285)" into ub-now-lunchbox

* commit '474a35735ae758757dfd161a5c045d027bb9e033':
  Avoid stripping empty screens if the workspace is still loading (issue 12523285)
This commit is contained in:
Adam Cohen
2014-03-03 11:19:36 -08:00
committed by Android Git Automerger
2 changed files with 12 additions and 0 deletions
+6
View File
@@ -2077,6 +2077,10 @@ public class Launcher extends Activity
return mWorkspaceLoading || mWaitingForResult;
}
public boolean isWorkspaceLoading() {
return mWorkspaceLoading;
}
private void resetAddInfo() {
mPendingAddInfo.container = ItemInfo.NO_ID;
mPendingAddInfo.screenId = -1;
@@ -3807,6 +3811,8 @@ public class Launcher extends Activity
* Implementation of the method from LauncherModel.Callbacks.
*/
public void startBinding() {
mWorkspaceLoading = true;
// If we're starting binding all over again, clear any bind calls we'd postponed in
// the past (see waitUntilResume) -- we don't need them since we're starting binding
// from scratch again
+6
View File
@@ -863,6 +863,12 @@ public class Workspace extends SmoothPagedView
// Log to disk
Launcher.addDumpLog(TAG, "11683562 - stripEmptyScreens()", true);
if (isWorkspaceLoading()) {
// Don't strip empty screens if the workspace is still loading
Launcher.addDumpLog(TAG, " - workspace loading, skip", true);
return;
}
if (isPageMoving()) {
mStripScreensOnPageStopMoving = true;
return;