Merge "Add timer duration to UsageStatistics." into ub-camera-everglades
diff --git a/src/com/android/camera/PhotoModule.java b/src/com/android/camera/PhotoModule.java
index 478418b..5f976ee 100644
--- a/src/com/android/camera/PhotoModule.java
+++ b/src/com/android/camera/PhotoModule.java
@@ -152,6 +152,7 @@
     private static final int SCREEN_DELAY = 2 * 60 * 1000;
 
     private int mZoomValue; // The current zoom value.
+    private int mTimerDuration;
 
     private Parameters mInitialParams;
     private boolean mFocusAreaSupported;
@@ -1044,7 +1045,8 @@
             UsageStatistics.instance().photoCaptureDoneEvent(
                     eventprotos.NavigationChange.Mode.PHOTO_CAPTURE,
                     mNamedImages.mQueue.lastElement().title + ".jpg", exif,
-                    isCameraFrontFacing(), hdrOn, zoomValue, flashSetting, gridLinesOn);
+                    isCameraFrontFacing(), hdrOn, zoomValue, flashSetting, gridLinesOn,
+                    (float) mTimerDuration);
 
             if (!mIsImageCaptureIntent) {
                 // Calculate the width and the height of the jpeg.
@@ -1442,6 +1444,7 @@
 
         int countDownDuration = Integer.parseInt(mActivity.getSettingsManager()
                 .get(SettingsManager.SETTING_COUNTDOWN_DURATION));
+        mTimerDuration = countDownDuration;
         if (countDownDuration > 0) {
             // Start count down.
             mAppController.getCameraAppUI().transitionToCancel();
diff --git a/src/com/android/camera/VideoModule.java b/src/com/android/camera/VideoModule.java
index 0c6b565..03795f7 100644
--- a/src/com/android/camera/VideoModule.java
+++ b/src/com/android/camera/VideoModule.java
@@ -1841,7 +1841,7 @@
         Boolean gridLinesOn = mActivity.getSettingsManager().areGridLinesOn();
         UsageStatistics.instance().photoCaptureDoneEvent(
                 eventprotos.NavigationChange.Mode.VIDEO_STILL, title + ".jpeg", exif,
-                isCameraFrontFacing(), false, currentZoomValue(), flashSetting, gridLinesOn);
+                isCameraFrontFacing(), false, currentZoomValue(), flashSetting, gridLinesOn, null);
 
         getServices().getMediaSaver().addImage(
                 data, title, dateTaken, loc, orientation,
diff --git a/src_pd/com/android/camera/util/UsageStatistics.java b/src_pd/com/android/camera/util/UsageStatistics.java
index 80332b0..4079a36 100644
--- a/src_pd/com/android/camera/util/UsageStatistics.java
+++ b/src_pd/com/android/camera/util/UsageStatistics.java
@@ -54,7 +54,8 @@
 
     public void photoCaptureDoneEvent(int mode, String fileRef, ExifInterface exifRef,
                                       boolean front, boolean isHDR, float zoom,
-                                      String flashSetting, boolean gridLinesOn) {
+                                      String flashSetting, boolean gridLinesOn,
+                                      Float timerSeconds) {
     }
 
     public void cameraFailure(int cause, String info) {