From bbcaf793b27d9ee2976836a1d13b85e24e0aa652 Mon Sep 17 00:00:00 2001 From: Ruben Brunk Date: Mon, 17 Jun 2013 13:49:45 -0700 Subject: Fix IDs for analytics, unlocalize serialization IDs. Bug: 9467671 Bug: 9336168 Change-Id: Icb0037ab853598b8ad6b931808074f824ea706ed --- .../gallery3d/filtershow/filters/BaseFiltersManager.java | 14 ++++++++++++++ .../filtershow/filters/FilterFxRepresentation.java | 2 -- .../android/gallery3d/filtershow/presets/ImagePreset.java | 2 +- 3 files changed, 15 insertions(+), 3 deletions(-) (limited to 'src') 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; -- cgit v1.2.3