diff options
author | Bobby Georgescu <georgescu@google.com> | 2013-04-01 15:33:17 -0700 |
---|---|---|
committer | Bobby Georgescu <georgescu@google.com> | 2013-04-02 10:18:53 -0700 |
commit | 301b64679cfbd452060ac5b9595d315135550120 (patch) | |
tree | 7be6e9cd96da952264759f4c0f576947cd36861d /src/com/android/camera | |
parent | e5a79a5bd8ca3e25c14e4fe5df7c1ee1b544dc7e (diff) | |
download | android_packages_apps_Snap-301b64679cfbd452060ac5b9595d315135550120.tar.gz android_packages_apps_Snap-301b64679cfbd452060ac5b9595d315135550120.tar.bz2 android_packages_apps_Snap-301b64679cfbd452060ac5b9595d315135550120.zip |
Usage statistics for photo and video capture
Bug: 8433834
Change-Id: Idb4343a9e8d6895adbf9707e8c7811d007acc984
Diffstat (limited to 'src/com/android/camera')
-rw-r--r-- | src/com/android/camera/PhotoModule.java | 2 | ||||
-rw-r--r-- | src/com/android/camera/VideoModule.java | 8 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/com/android/camera/PhotoModule.java b/src/com/android/camera/PhotoModule.java index f4bd4ce1d..22bd6503f 100644 --- a/src/com/android/camera/PhotoModule.java +++ b/src/com/android/camera/PhotoModule.java @@ -1013,6 +1013,8 @@ public class PhotoModule mFaceDetectionStarted = false; setCameraState(SNAPSHOT_IN_PROGRESS); + UsageStatistics.onEvent(UsageStatistics.COMPONENT_CAMERA, + UsageStatistics.ACTION_CAPTURE_DONE, "Photo"); return true; } diff --git a/src/com/android/camera/VideoModule.java b/src/com/android/camera/VideoModule.java index 1f31778df..09a406ce5 100644 --- a/src/com/android/camera/VideoModule.java +++ b/src/com/android/camera/VideoModule.java @@ -450,6 +450,8 @@ public class VideoModule implements CameraModule, mActivity.mCameraDevice.takePicture(null, null, null, new JpegPictureCallback(loc)); showVideoSnapshotUI(true); mSnapshotInProgress = true; + UsageStatistics.onEvent(UsageStatistics.COMPONENT_CAMERA, + UsageStatistics.ACTION_CAPTURE_DONE, "VideoSnapshot"); } @Override @@ -1547,6 +1549,8 @@ public class VideoModule implements CameraModule, updateRecordingTime(); keepScreenOn(); + UsageStatistics.onEvent(UsageStatistics.COMPONENT_CAMERA, + UsageStatistics.ACTION_CAPTURE_START, "Video"); } private void showCaptureResult() { @@ -1662,6 +1666,10 @@ public class VideoModule implements CameraModule, // Update the parameters here because the parameters might have been altered // by MediaRecorder. if (!mPaused) mParameters = mActivity.mCameraDevice.getParameters(); + UsageStatistics.onEvent(UsageStatistics.COMPONENT_CAMERA, + fail ? UsageStatistics.ACTION_CAPTURE_FAIL : + UsageStatistics.ACTION_CAPTURE_DONE, "Video", + SystemClock.uptimeMillis() - mRecordingStartTime); return fail; } |