Merge "Log name of borders and filters of saved images" into gb-ub-photos-bryce
diff --git a/src/com/android/gallery3d/filtershow/presets/ImagePreset.java b/src/com/android/gallery3d/filtershow/presets/ImagePreset.java
index e0ff0b3..3530935 100644
--- a/src/com/android/gallery3d/filtershow/presets/ImagePreset.java
+++ b/src/com/android/gallery3d/filtershow/presets/ImagePreset.java
@@ -30,6 +30,7 @@
 import com.android.gallery3d.filtershow.imageshow.MasterImage;
 import com.android.gallery3d.filtershow.state.State;
 import com.android.gallery3d.filtershow.state.StateAdapter;
+import com.android.gallery3d.util.UsageStatistics;
 
 import java.util.Vector;
 
@@ -459,6 +460,10 @@
         if (mBorder != null && mDoApplyGeometry) {
             mBorder.synchronizeRepresentation();
             bitmap = environment.applyRepresentation(mBorder, bitmap);
+            if (environment.getQuality() == QUALITY_FINAL) {
+                UsageStatistics.onEvent(UsageStatistics.COMPONENT_EDITOR,
+                        "SaveBorder", mBorder.getName(), 1);
+            }
         }
         return bitmap;
     }
@@ -478,6 +483,10 @@
                     representation.synchronizeRepresentation();
                 }
                 bitmap = environment.applyRepresentation(representation, bitmap);
+                if (environment.getQuality() == QUALITY_FINAL) {
+                    UsageStatistics.onEvent(UsageStatistics.COMPONENT_EDITOR,
+                            "SaveFilter", representation.getName(), 1);
+                }
                 if (environment.needsStop()) {
                     return bitmap;
                 }