diff options
author | John Hoford <hoford@google.com> | 2013-04-20 08:12:48 -0700 |
---|---|---|
committer | John Hoford <hoford@google.com> | 2013-04-23 19:19:09 -0700 |
commit | dcd31fe8f7bc219b4e8f7608a6d5ad016da0f885 (patch) | |
tree | 4318a5b94eb2fc369ed3b6cee6d7f8dca04ddd37 /src/com/android/gallery3d/filtershow/editors | |
parent | f9ff7ffe2004ed2077f38a91dafb213495e5bf70 (diff) | |
download | android_packages_apps_Snap-dcd31fe8f7bc219b4e8f7608a6d5ad016da0f885.tar.gz android_packages_apps_Snap-dcd31fe8f7bc219b4e8f7608a6d5ad016da0f885.tar.bz2 android_packages_apps_Snap-dcd31fe8f7bc219b4e8f7608a6d5ad016da0f885.zip |
Fix local adjust
bug:8655977
Change-Id: I0aa4ac30de077663f52418528757a842372e0fc2
Diffstat (limited to 'src/com/android/gallery3d/filtershow/editors')
-rw-r--r-- | src/com/android/gallery3d/filtershow/editors/Editor.java | 12 | ||||
-rw-r--r-- | src/com/android/gallery3d/filtershow/editors/ParametricEditor.java | 4 |
2 files changed, 7 insertions, 9 deletions
diff --git a/src/com/android/gallery3d/filtershow/editors/Editor.java b/src/com/android/gallery3d/filtershow/editors/Editor.java index 1e239e632..dc13b3e37 100644 --- a/src/com/android/gallery3d/filtershow/editors/Editor.java +++ b/src/com/android/gallery3d/filtershow/editors/Editor.java @@ -64,13 +64,7 @@ public class Editor implements OnSeekBarChangeListener, SwapButton.SwapButtonLis } public String calculateUserMessage(Context context, String effectName, Object parameterValue) { - String apply = ""; - if (mShowParameter == SHOW_VALUE_INT) { - apply += " " + effectName + " " + parameterValue; - } else { - apply += " " + effectName; - } - return apply; + return effectName + " " + parameterValue; } protected Editor(int id) { @@ -214,7 +208,9 @@ public class Editor implements OnSeekBarChangeListener, SwapButton.SwapButtonLis public void commitLocalRepresentation() { ImagePreset preset = MasterImage.getImage().getPreset(); preset.updateFilterRepresentation(getLocalRepresentation()); - mPanelController.onNewValue(-1); + if (mPanelController != null) { + mPanelController.onNewValue(-1); + } } /** diff --git a/src/com/android/gallery3d/filtershow/editors/ParametricEditor.java b/src/com/android/gallery3d/filtershow/editors/ParametricEditor.java index e49f6cd15..33ed143bd 100644 --- a/src/com/android/gallery3d/filtershow/editors/ParametricEditor.java +++ b/src/com/android/gallery3d/filtershow/editors/ParametricEditor.java @@ -198,7 +198,9 @@ public class ParametricEditor extends Editor { public void commitLocalRepresentation() { super.commitLocalRepresentation(); FilterRepresentation rep = getLocalRepresentation(); - mPanelController.onNewValue(-1); + if (mPanelController != null) { + mPanelController.onNewValue(-1); + } } @Override |