Add metrics logging for file operations.
Log to two new histograms - one for operations originating from system
providers, the other for operations originating from external providers.
Events in these histograms are bucketed by
- type (copy, move, delete, etc)
- destination (system vs external provider, with a special bucket for
intra-provider operations)
- result (success vs failure)
BUG=26737132
Change-Id: Ic24c7a22fa3c1227e23cfbd42ae80ca1f70a19ba
diff --git a/packages/DocumentsUI/src/com/android/documentsui/services/DeleteJob.java b/packages/DocumentsUI/src/com/android/documentsui/services/DeleteJob.java
index 24eb987..11c3a29 100644
--- a/packages/DocumentsUI/src/com/android/documentsui/services/DeleteJob.java
+++ b/packages/DocumentsUI/src/com/android/documentsui/services/DeleteJob.java
@@ -25,6 +25,7 @@
import android.os.RemoteException;
import android.util.Log;
+import com.android.documentsui.Metrics;
import com.android.documentsui.R;
import com.android.documentsui.model.DocumentInfo;
import com.android.documentsui.model.DocumentStack;
@@ -90,6 +91,7 @@
onFileFailed(doc);
}
}
+ Metrics.logFileOperation(service, operationType, mSrcs, null);
}
@Override