OSDN Git Service

Fix problem where launcher doesn't draw after rotation w/ translucent activity above it
authorAdam Cohen <adamcohen@google.com>
Thu, 19 Jun 2014 21:50:51 +0000 (14:50 -0700)
committerAdam Cohen <adamcohen@google.com>
Thu, 19 Jun 2014 21:54:51 +0000 (14:54 -0700)
-> Removed some code which caused this. The code was intended to fix a certain issue:
"Fixing issue where we were reverting to the first page of the workspace after
launching an application from all apps, rotating, and returning home"
-> That bug doesn't seem to occur anymore, even with the revert
-> See https://googleplex-android-review.googlesource.com/#/c/209561/1

issue 11808251

Change-Id: I14ada19a294d2e5139a9e650d55f1cd985dd00d3

src/com/android/launcher3/Launcher.java

index d76b238..ad501a3 100644 (file)
@@ -286,9 +286,6 @@ public class Launcher extends Activity
     private ArrayList<Runnable> mBindOnResumeCallbacks = new ArrayList<Runnable>();
     private ArrayList<Runnable> mOnResumeCallbacks = new ArrayList<Runnable>();
 
-    // Keep track of whether the user has left launcher
-    private static boolean sPausedFromUserAction = false;
-
     private Bundle mSavedInstanceState;
 
     private LauncherModel mModel;
@@ -465,7 +462,7 @@ public class Launcher extends Activity
         }
 
         if (!mRestoring) {
-            if (DISABLE_SYNCHRONOUS_BINDING_CURRENT_PAGE || sPausedFromUserAction) {
+            if (DISABLE_SYNCHRONOUS_BINDING_CURRENT_PAGE) {
                 // If the user leaves launcher, then we should just load items asynchronously when
                 // they return.
                 mModel.startLoader(true, PagedView.INVALID_RESTORE_PAGE);
@@ -511,11 +508,6 @@ public class Launcher extends Activity
     @Override
     public void onLauncherProviderChange() { }
 
-    protected void onUserLeaveHint() {
-        super.onUserLeaveHint();
-        sPausedFromUserAction = true;
-    }
-
     /** To be overriden by subclasses to hint to Launcher that we have custom content */
     protected boolean hasCustomContentToLeft() {
         return false;
@@ -971,7 +963,6 @@ public class Launcher extends Activity
         setWorkspaceBackground(mState == State.WORKSPACE);
 
         mPaused = false;
-        sPausedFromUserAction = false;
         if (mRestoring || mOnResumeNeedsLoad) {
             setWorkspaceLoading(true);
             mModel.startLoader(true, PagedView.INVALID_RESTORE_PAGE);