OSDN Git Service

Revert workaround for move to default screen on home intent.
authorIvan Lee <ivanylee@google.com>
Thu, 3 Sep 2015 16:16:07 +0000 (10:16 -0600)
committerIvan Lee <ivanylee@google.com>
Thu, 3 Sep 2015 16:16:07 +0000 (10:16 -0600)
BUG=23556755

Change-Id: Ia268a58389b90fd0503e474f02f33a312c051c0e

src/com/android/launcher3/Launcher.java

index 2873d37..1f843cb 100644 (file)
@@ -1865,8 +1865,6 @@ public class Launcher extends Activity
         boolean alreadyOnHome = mHasFocus && ((intent.getFlags() &
                 Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT)
                 != Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT);
-        boolean moveToDefaultScreen = mLauncherCallbacks != null ?
-                mLauncherCallbacks.shouldMoveToDefaultScreenOnHomeIntent() : true;
         boolean isActionMain = Intent.ACTION_MAIN.equals(intent.getAction());
         if (isActionMain) {
             // also will cancel mWaitingForResult.
@@ -1920,6 +1918,8 @@ public class Launcher extends Activity
         // as slow logic in the callbacks eat into the time the scroller expects for the snapToPage
         // animation.
         if (isActionMain) {
+            boolean moveToDefaultScreen = mLauncherCallbacks != null ?
+                    mLauncherCallbacks.shouldMoveToDefaultScreenOnHomeIntent() : true;
             if (alreadyOnHome && mState == State.WORKSPACE && !mWorkspace.isTouchActive() &&
                     openFolder == null && moveToDefaultScreen) {
                 mWorkspace.post(new Runnable() {