From 5fb63473cbc7f1b77e45c765d56b01361772429b Mon Sep 17 00:00:00 2001 From: Winson Chung Date: Wed, 2 Feb 2011 17:03:37 -0800 Subject: [PATCH] Disabling auto-advance when we are not on the workspace. (3413510) Change-Id: I3793d4221b4ec91ed1fbf35a9e5ff0237e7e8542 --- src/com/android/launcher2/Launcher.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java index faf9bc6fb5..7e69681ebe 100644 --- a/src/com/android/launcher2/Launcher.java +++ b/src/com/android/launcher2/Launcher.java @@ -2919,6 +2919,10 @@ public final class Launcher extends Activity // Change the state *after* we've called all the transition code mState = State.ALL_APPS; + // Pause the auto-advance of widgets until we are out of AllApps + mUserPresent = false; + updateRunning(); + // send an accessibility event to announce the context change getWindow().getDecorView().sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_SELECTED); } @@ -2944,6 +2948,10 @@ public final class Launcher extends Activity // Change the state *after* we've called all the transition code mState = State.WORKSPACE; + // Resume the auto-advance of widgets + mUserPresent = true; + updateRunning(); + // send an accessibility event to announce the context change getWindow().getDecorView().sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_SELECTED); } @@ -3044,6 +3052,10 @@ public final class Launcher extends Activity } // Change the state *after* we've called all the transition code mState = State.CUSTOMIZE; + + // Pause the auto-advance of widgets until we are out of Customization drawer + mUserPresent = false; + updateRunning(); } // Hide the customization drawer (only exists in x-large configuration)