summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/com/android/launcher2/AppsCustomizePagedView.java20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/com/android/launcher2/AppsCustomizePagedView.java b/src/com/android/launcher2/AppsCustomizePagedView.java
index 4103141db..d8ff73c04 100644
--- a/src/com/android/launcher2/AppsCustomizePagedView.java
+++ b/src/com/android/launcher2/AppsCustomizePagedView.java
@@ -643,12 +643,14 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen
private void updateCurrentTab(int currentPage) {
AppsCustomizeTabHost tabHost = getTabHost();
String tag = tabHost.getCurrentTabTag();
- if (currentPage >= mNumAppsPages &&
- !tag.equals(tabHost.getTabTagForContentType(ContentType.Widgets))) {
- tabHost.setCurrentTabFromContent(ContentType.Widgets);
- } else if (currentPage < mNumAppsPages &&
- !tag.equals(tabHost.getTabTagForContentType(ContentType.Applications))) {
- tabHost.setCurrentTabFromContent(ContentType.Applications);
+ if (tag != null) {
+ if (currentPage >= mNumAppsPages &&
+ !tag.equals(tabHost.getTabTagForContentType(ContentType.Widgets))) {
+ tabHost.setCurrentTabFromContent(ContentType.Widgets);
+ } else if (currentPage < mNumAppsPages &&
+ !tag.equals(tabHost.getTabTagForContentType(ContentType.Applications))) {
+ tabHost.setCurrentTabFromContent(ContentType.Applications);
+ }
}
}
@@ -1367,8 +1369,10 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen
public void reset() {
AppsCustomizeTabHost tabHost = getTabHost();
String tag = tabHost.getCurrentTabTag();
- if (!tag.equals(tabHost.getTabTagForContentType(ContentType.Applications))) {
- tabHost.setCurrentTabFromContent(ContentType.Applications);
+ if (tag != null) {
+ if (!tag.equals(tabHost.getTabTagForContentType(ContentType.Applications))) {
+ tabHost.setCurrentTabFromContent(ContentType.Applications);
+ }
}
if (mCurrentPage != 0) {
invalidatePageData(0);