summaryrefslogtreecommitdiffstats
path: root/src/com/android/gallery3d
diff options
context:
space:
mode:
authorRuben Brunk <rubenbrunk@google.com>2013-06-17 13:49:45 -0700
committerRuben Brunk <rubenbrunk@google.com>2013-06-17 13:50:37 -0700
commitbbcaf793b27d9ee2976836a1d13b85e24e0aa652 (patch)
treecfde68b03a01c444d0086b6abdb54c5211b7938f /src/com/android/gallery3d
parent682c7e316d4cae77c934fc3e6859a2f0f279edb7 (diff)
downloadandroid_packages_apps_Snap-bbcaf793b27d9ee2976836a1d13b85e24e0aa652.tar.gz
android_packages_apps_Snap-bbcaf793b27d9ee2976836a1d13b85e24e0aa652.tar.bz2
android_packages_apps_Snap-bbcaf793b27d9ee2976836a1d13b85e24e0aa652.zip
Fix IDs for analytics, unlocalize serialization IDs.
Bug: 9467671 Bug: 9336168 Change-Id: Icb0037ab853598b8ad6b931808074f824ea706ed
Diffstat (limited to 'src/com/android/gallery3d')
-rw-r--r--src/com/android/gallery3d/filtershow/filters/BaseFiltersManager.java14
-rw-r--r--src/com/android/gallery3d/filtershow/filters/FilterFxRepresentation.java2
-rw-r--r--src/com/android/gallery3d/filtershow/presets/ImagePreset.java2
3 files changed, 15 insertions, 3 deletions
diff --git a/src/com/android/gallery3d/filtershow/filters/BaseFiltersManager.java b/src/com/android/gallery3d/filtershow/filters/BaseFiltersManager.java
index 4186b9337..daa599940 100644
--- a/src/com/android/gallery3d/filtershow/filters/BaseFiltersManager.java
+++ b/src/com/android/gallery3d/filtershow/filters/BaseFiltersManager.java
@@ -162,9 +162,23 @@ public abstract class BaseFiltersManager implements FiltersManagerInterface {
R.string.ffx_x_process
};
+ // Do not localize.
+ String[] serializationNames = {
+ "LUT3D_PUNCH",
+ "LUT3D_VINTAGE",
+ "LUT3D_BW",
+ "LUT3D_BLEACH",
+ "LUT3D_INSTANT",
+ "LUT3D_WASHOUT",
+ "LUT3D_BLUECRUSH",
+ "LUT3D_WASHOUT",
+ "LUT3D_XPROCESS"
+ };
+
for (int i = 0; i < drawid.length; i++) {
FilterFxRepresentation fx = new FilterFxRepresentation(
context.getString(fxNameid[i]), drawid[i], fxNameid[i]);
+ fx.setSerializationName(serializationNames[i]);
representations.add(fx);
addRepresentation(fx);
}
diff --git a/src/com/android/gallery3d/filtershow/filters/FilterFxRepresentation.java b/src/com/android/gallery3d/filtershow/filters/FilterFxRepresentation.java
index 2dbff94bd..dfe0308c1 100644
--- a/src/com/android/gallery3d/filtershow/filters/FilterFxRepresentation.java
+++ b/src/com/android/gallery3d/filtershow/filters/FilterFxRepresentation.java
@@ -19,7 +19,6 @@ package com.android.gallery3d.filtershow.filters;
import com.android.gallery3d.filtershow.editors.ImageOnlyEditor;
public class FilterFxRepresentation extends FilterRepresentation {
- private static final String SERIALIZATION_NAME = "LUT3D";
private static final String LOGTAG = "FilterFxRepresentation";
// TODO: When implementing serialization, we should find a unique way of
// specifying bitmaps / names (the resource IDs being random)
@@ -28,7 +27,6 @@ public class FilterFxRepresentation extends FilterRepresentation {
public FilterFxRepresentation(String name, int bitmapResource, int nameResource) {
super(name);
- setSerializationName(SERIALIZATION_NAME + "_" + name);
setFilterClass(ImageFilterFx.class);
mBitmapResource = bitmapResource;
mNameResource = nameResource;
diff --git a/src/com/android/gallery3d/filtershow/presets/ImagePreset.java b/src/com/android/gallery3d/filtershow/presets/ImagePreset.java
index f06e048a2..5eddc9134 100644
--- a/src/com/android/gallery3d/filtershow/presets/ImagePreset.java
+++ b/src/com/android/gallery3d/filtershow/presets/ImagePreset.java
@@ -498,7 +498,7 @@ public class ImagePreset {
bitmap = environment.applyRepresentation(representation, bitmap);
if (environment.getQuality() == FilterEnvironment.QUALITY_FINAL) {
UsageStatistics.onEvent(UsageStatistics.COMPONENT_EDITOR,
- "SaveFilter", representation.getName(), 1);
+ "SaveFilter", representation.getSerializationName(), 1);
}
if (environment.needsStop()) {
return bitmap;