summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorWinson Chung <winsonc@google.com>2013-10-09 11:20:57 -0700
committerWinson Chung <winsonc@google.com>2013-10-09 11:34:45 -0700
commit82963d530ac92ca770c5b674ee5a6c80eb6506d2 (patch)
treedc1815a83ca93f5aecc70c27ee69fee155f97c24 /src
parentd706e0a8133a3a570013b7512c593845850a0f1f (diff)
downloadandroid_packages_apps_Trebuchet-82963d530ac92ca770c5b674ee5a6c80eb6506d2.tar.gz
android_packages_apps_Trebuchet-82963d530ac92ca770c5b674ee5a6c80eb6506d2.tar.bz2
android_packages_apps_Trebuchet-82963d530ac92ca770c5b674ee5a6c80eb6506d2.zip
Removing extraneous apps-customize page reset. (Bug 11027505)
Diffstat (limited to 'src')
-rw-r--r--src/com/android/launcher3/Launcher.java20
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();