diff options
author | Bobby Georgescu <georgescu@google.com> | 2013-04-02 20:09:50 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-04-02 20:09:50 +0000 |
commit | 0235199a906f7cda3713a689018930912688b866 (patch) | |
tree | b55cb76d576224996180dd3c0c99b93bea6d1502 /src/com/android/camera | |
parent | 187a09a330f9c62783741b85b86b12610b2f595d (diff) | |
parent | 301b64679cfbd452060ac5b9595d315135550120 (diff) | |
download | android_packages_apps_Snap-0235199a906f7cda3713a689018930912688b866.tar.gz android_packages_apps_Snap-0235199a906f7cda3713a689018930912688b866.tar.bz2 android_packages_apps_Snap-0235199a906f7cda3713a689018930912688b866.zip |
Merge "Usage statistics for photo and video capture" into gb-ub-photos-bryce
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; } |