diff options
author | Winson Chung <winsonc@google.com> | 2013-10-09 23:04:41 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-10-09 23:04:42 +0000 |
commit | 5511ff963e561413711d30c64dc8971a01a86897 (patch) | |
tree | 6a54a25c3378bee118d987d3ff4a4f0e18be6208 /src | |
parent | 558f1c2ac73c3a0c3c0c316222b6b7f9c76e2501 (diff) | |
parent | 82963d530ac92ca770c5b674ee5a6c80eb6506d2 (diff) | |
download | android_packages_apps_Trebuchet-5511ff963e561413711d30c64dc8971a01a86897.tar.gz android_packages_apps_Trebuchet-5511ff963e561413711d30c64dc8971a01a86897.tar.bz2 android_packages_apps_Trebuchet-5511ff963e561413711d30c64dc8971a01a86897.zip |
Merge "Removing extraneous apps-customize page reset. (Bug 11027505)" into jb-ub-now-indigo-rose
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/launcher3/Launcher.java | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java index 5aec399b5..85de80aba 100644 --- a/src/com/android/launcher3/Launcher.java +++ b/src/com/android/launcher3/Launcher.java @@ -838,7 +838,7 @@ public class Launcher extends Activity if (mOnResumeState == State.WORKSPACE) { showWorkspace(false); } else if (mOnResumeState == State.APPS_CUSTOMIZE) { - showAllApps(false, AppsCustomizePagedView.ContentType.Applications); + showAllApps(false, AppsCustomizePagedView.ContentType.Applications, false); } mOnResumeState = State.NONE; @@ -893,10 +893,7 @@ public class Launcher extends Activity // Resets the previous all apps icon press state mAppsCustomizeContent.resetDrawableState(); } - // Reset AllApps to its initial state - if (mAppsCustomizeTabHost != null) { - mAppsCustomizeTabHost.reset(); - } + // It is possible that widgets can receive updates while launcher is not in the foreground. // Consequently, the widgets will be inflated in the orientation of the foreground activity // (framework issue). On resuming, we ensure that any widgets are inflated for the current @@ -1161,7 +1158,7 @@ public class Launcher extends Activity widgetButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View arg0) { - showAllApps(true, AppsCustomizePagedView.ContentType.Widgets); + showAllApps(true, AppsCustomizePagedView.ContentType.Widgets, true); } }); widgetButton.setOnTouchListener(getHapticFeedbackTouchListener()); @@ -2174,7 +2171,7 @@ public class Launcher extends Activity final String shortcutClass = intent.getComponent().getClassName(); if (shortcutClass.equals(WidgetAdder.class.getName())) { - showAllApps(true, AppsCustomizePagedView.ContentType.Widgets); + showAllApps(true, AppsCustomizePagedView.ContentType.Widgets, true); return; } else if (shortcutClass.equals(MemoryDumpActivity.class.getName())) { MemoryDumpActivity.startDump(this); @@ -2264,7 +2261,7 @@ public class Launcher extends Activity * @param v The view that was clicked. */ public void onClickAllAppsButton(View v) { - showAllApps(true, AppsCustomizePagedView.ContentType.Applications); + showAllApps(true, AppsCustomizePagedView.ContentType.Applications, true); } public void onTouchDownAllAppsButton(View v) { @@ -3075,10 +3072,13 @@ public class Launcher extends Activity public void onWorkspaceShown(boolean animated) { } - void showAllApps(boolean animated, - AppsCustomizePagedView.ContentType contentType) { + void showAllApps(boolean animated, AppsCustomizePagedView.ContentType contentType, + boolean resetPageToZero) { if (mState != State.WORKSPACE) return; + if (resetPageToZero) { + mAppsCustomizeTabHost.reset(); + } showAppsCustomizeHelper(animated, false, contentType); mAppsCustomizeTabHost.requestFocus(); |