diff options
author | ztenghui <ztenghui@google.com> | 2013-07-01 23:42:03 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-07-01 23:42:04 +0000 |
commit | 59552e6424a93bf8ba55fa770b7d7a230ea10db9 (patch) | |
tree | d01e93b5c106fadd4e24599146e226029a9ae01c /src | |
parent | 54d97996e53871b01a49b177960c6c2132da94e2 (diff) | |
parent | 1ffd4a20e4b93ff7b54e4c8c8e6d977062ca40bd (diff) | |
download | android_packages_apps_Snap-59552e6424a93bf8ba55fa770b7d7a230ea10db9.tar.gz android_packages_apps_Snap-59552e6424a93bf8ba55fa770b7d7a230ea10db9.tar.bz2 android_packages_apps_Snap-59552e6424a93bf8ba55fa770b7d7a230ea10db9.zip |
Merge "Fix the save button issue." into gb-ub-photos-carlsbad
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/gallery3d/filtershow/filters/FilterRepresentation.java | 3 | ||||
-rw-r--r-- | src/com/android/gallery3d/filtershow/presets/ImagePreset.java | 14 |
2 files changed, 17 insertions, 0 deletions
diff --git a/src/com/android/gallery3d/filtershow/filters/FilterRepresentation.java b/src/com/android/gallery3d/filtershow/filters/FilterRepresentation.java index c046a6e7f..a60410d2b 100644 --- a/src/com/android/gallery3d/filtershow/filters/FilterRepresentation.java +++ b/src/com/android/gallery3d/filtershow/filters/FilterRepresentation.java @@ -174,6 +174,9 @@ public class FilterRepresentation implements Cloneable { mFilterClass = filterClass; } + // This same() function is different from equals(), basically it checks + // whether 2 FilterRepresentations are the same type. It doesn't care about + // the values. public boolean same(FilterRepresentation b) { if (b == null) { return false; diff --git a/src/com/android/gallery3d/filtershow/presets/ImagePreset.java b/src/com/android/gallery3d/filtershow/presets/ImagePreset.java index 6f752d963..4ec39f765 100644 --- a/src/com/android/gallery3d/filtershow/presets/ImagePreset.java +++ b/src/com/android/gallery3d/filtershow/presets/ImagePreset.java @@ -186,6 +186,20 @@ public class ImagePreset { return geo; } + public boolean hasModifications() { + for (int i = 0; i < mFilters.size(); i++) { + FilterRepresentation filter = mFilters.elementAt(i); + if (filter instanceof GeometryMetadata) { + if (((GeometryMetadata) filter).hasModifications()) { + return true; + } + } else if (!filter.isNil()) { + return true; + } + } + return false; + } + public boolean isPanoramaSafe() { for (FilterRepresentation representation : mFilters) { if (representation instanceof GeometryMetadata) { |