Saving AllApps page when rotating screen, fixing customization rotate flash.

Change-Id: Idc4b919fa34413578fc07be263aadffb062f6115
diff --git a/src/com/android/launcher2/CustomizePagedView.java b/src/com/android/launcher2/CustomizePagedView.java
index 4eb852c..60f1c90 100644
--- a/src/com/android/launcher2/CustomizePagedView.java
+++ b/src/com/android/launcher2/CustomizePagedView.java
@@ -311,12 +311,18 @@
 
     public void setCustomizationFilter(CustomizationType filterType) {
         mCustomizationType = filterType;
-        setCurrentPage(0);
-        updateCurrentPageScroll();
-        invalidatePageData();
+        if (getChildCount() > 0) {
+            setCurrentPage(0);
+            updateCurrentPageScroll();
+            invalidatePageData();
 
-        // End the current choice mode so that we don't carry selections across tabs
-        endChoiceMode();
+            // End the current choice mode so that we don't carry selections across tabs
+            endChoiceMode();
+        }
+    }
+
+    public CustomizationType getCustomizationFilter() {
+        return mCustomizationType;
     }
 
     @Override