OSDN Git Service

Log name of borders and filters of saved images
authorBobby Georgescu <georgescu@google.com>
Fri, 26 Apr 2013 22:27:14 +0000 (15:27 -0700)
committerBobby Georgescu <georgescu@google.com>
Fri, 26 Apr 2013 22:30:09 +0000 (15:30 -0700)
Bug: 8712946
Change-Id: Id7b32ceb00b131299c6d8630bca181141dc204fd

src/com/android/gallery3d/filtershow/presets/ImagePreset.java

index e0ff0b3..3530935 100644 (file)
@@ -30,6 +30,7 @@ import com.android.gallery3d.filtershow.imageshow.GeometryMetadata;
 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 @@ public class ImagePreset {
         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 @@ public class ImagePreset {
                     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;
                 }