From 649668f7af9ef730466082f935831c901cafc74a Mon Sep 17 00:00:00 2001 From: Winson Chung Date: Tue, 10 Jan 2012 13:07:16 -0800 Subject: [PATCH] Fixing issue where we may continue to restore the wrong page after resetting. - Fixes issue where selected tab and all apps page are out of sync - Potentially fixes issue where the allapps comes in from the right Change-Id: I03fe1fe339ef53aa442c411939250c8094519394 --- src/com/android/launcher2/AppsCustomizePagedView.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/com/android/launcher2/AppsCustomizePagedView.java b/src/com/android/launcher2/AppsCustomizePagedView.java index 7f0edde75a..94b92d1979 100644 --- a/src/com/android/launcher2/AppsCustomizePagedView.java +++ b/src/com/android/launcher2/AppsCustomizePagedView.java @@ -1490,6 +1490,9 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen @Override public void reset() { + // If we have reset, then we should not continue to restore the previous state + mSaveInstanceStateItemIndex = -1; + AppsCustomizeTabHost tabHost = getTabHost(); String tag = tabHost.getCurrentTabTag(); if (tag != null) { @@ -1497,6 +1500,7 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen tabHost.setCurrentTabFromContent(ContentType.Applications); } } + if (mCurrentPage != 0) { invalidatePageData(0); }