OSDN Git Service

Disable geometry button if tiny planet is here
authornicolasroard <nicolasroard@google.com>
Fri, 1 Nov 2013 23:03:35 +0000 (16:03 -0700)
committernicolasroard <nicolasroard@google.com>
Fri, 1 Nov 2013 23:03:35 +0000 (16:03 -0700)
bug:11288853
Change-Id: I818f406eb25e0f82c89ffde0bd91d2aa8ab31b94

src/com/android/gallery3d/filtershow/category/MainPanel.java
src/com/android/gallery3d/filtershow/imageshow/MasterImage.java

index eb1ce2b..082bf14 100644 (file)
@@ -27,6 +27,7 @@ import android.widget.LinearLayout;
 
 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 @@ public class MainPanel extends Fragment {
         if (mCurrentSelected == GEOMETRY) {
             return;
         }
+        if (MasterImage.getImage().hasTinyPlanet()) {
+            return;
+        }
         boolean fromRight = isRightAnimation(GEOMETRY);
         selection(mCurrentSelected, false);
         CategoryPanel categoryPanel = new CategoryPanel();
index 3513ded..f6b97f1 100644 (file)
@@ -829,4 +829,8 @@ public class MasterImage implements RenderingRequestCaller {
     public BitmapCache getBitmapCache() {
         return mBitmapCache;
     }
+
+    public boolean hasTinyPlanet() {
+        return mPreset.contains(FilterRepresentation.TYPE_TINYPLANET);
+    }
 }