Merge "Disable geometry button if tiny planet is here" into gb-ub-photos-carlsbad
diff --git a/src/com/android/gallery3d/filtershow/category/MainPanel.java b/src/com/android/gallery3d/filtershow/category/MainPanel.java
index eb1ce2b..082bf14 100644
--- a/src/com/android/gallery3d/filtershow/category/MainPanel.java
+++ b/src/com/android/gallery3d/filtershow/category/MainPanel.java
@@ -27,6 +27,7 @@
 
 import com.android.gallery3d.R;
 import com.android.gallery3d.filtershow.FilterShowActivity;
+import com.android.gallery3d.filtershow.imageshow.MasterImage;
 import com.android.gallery3d.filtershow.state.StatePanel;
 
 public class MainPanel extends Fragment {
@@ -176,6 +177,9 @@
         if (mCurrentSelected == GEOMETRY) {
             return;
         }
+        if (MasterImage.getImage().hasTinyPlanet()) {
+            return;
+        }
         boolean fromRight = isRightAnimation(GEOMETRY);
         selection(mCurrentSelected, false);
         CategoryPanel categoryPanel = new CategoryPanel();
diff --git a/src/com/android/gallery3d/filtershow/imageshow/MasterImage.java b/src/com/android/gallery3d/filtershow/imageshow/MasterImage.java
index 3513ded..f6b97f1 100644
--- a/src/com/android/gallery3d/filtershow/imageshow/MasterImage.java
+++ b/src/com/android/gallery3d/filtershow/imageshow/MasterImage.java
@@ -829,4 +829,8 @@
     public BitmapCache getBitmapCache() {
         return mBitmapCache;
     }
+
+    public boolean hasTinyPlanet() {
+        return mPreset.contains(FilterRepresentation.TYPE_TINYPLANET);
+    }
 }