summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChih-Chung Chang <chihchung@google.com>2009-07-03 18:25:26 +0800
committerChih-Chung Chang <chihchung@google.com>2009-07-03 18:25:26 +0800
commit0a28549a7e6db0307b2cb5d2df7444909fb03a48 (patch)
tree2e1f27da016c21aa770488524754685f12964b56
parent9f7388e9a31cb7560ec3009989a73aac23e36688 (diff)
downloadLegacyCamera-0a28549a7e6db0307b2cb5d2df7444909fb03a48.zip
LegacyCamera-0a28549a7e6db0307b2cb5d2df7444909fb03a48.tar.gz
LegacyCamera-0a28549a7e6db0307b2cb5d2df7444909fb03a48.tar.bz2
Change camera latency time variables to non-static.
-rw-r--r--src/com/android/camera/Camera.java12
-rwxr-xr-xtests/src/com/android/camera/stress/CameraLatency.java11
2 files changed, 12 insertions, 11 deletions
diff --git a/src/com/android/camera/Camera.java b/src/com/android/camera/Camera.java
index 12dda19..7cf9c4c 100644
--- a/src/com/android/camera/Camera.java
+++ b/src/com/android/camera/Camera.java
@@ -191,12 +191,12 @@ public class Camera extends Activity implements View.OnClickListener,
private long mJpegPictureCallbackTime;
private int mPicturesRemaining;
- //Add the camera latency time
- public static long mAutoFocusTime;
- public static long mShutterLag;
- public static long mShutterAndRawPictureCallbackTime;
- public static long mJpegPictureCallbackTimeLag;
- public static long mRawPictureAndJpegPictureCallbackTime;
+ // These latency time are for the CameraLatency test.
+ public long mAutoFocusTime;
+ public long mShutterLag;
+ public long mShutterAndRawPictureCallbackTime;
+ public long mJpegPictureCallbackTimeLag;
+ public long mRawPictureAndJpegPictureCallbackTime;
// Focus mode. Options are pref_camera_focusmode_entryvalues.
private String mFocusMode;
diff --git a/tests/src/com/android/camera/stress/CameraLatency.java b/tests/src/com/android/camera/stress/CameraLatency.java
index ed415c1..221e7b1 100755
--- a/tests/src/com/android/camera/stress/CameraLatency.java
+++ b/tests/src/com/android/camera/stress/CameraLatency.java
@@ -75,13 +75,14 @@ public class CameraLatency extends ActivityInstrumentationTestCase2 <Camera> {
Thread.sleep(WAIT_FOR_IMAGE_CAPTURE_TO_BE_TAKEN);
//skip the first measurement
if (i != 0) {
- mTotalAutoFocusTime += Camera.mAutoFocusTime;
- mTotalShutterLag += Camera.mShutterLag;
+ Camera c = getActivity();
+ mTotalAutoFocusTime += c.mAutoFocusTime;
+ mTotalShutterLag += c.mShutterLag;
mTotalShutterAndRawPictureCallbackTime +=
- Camera.mShutterAndRawPictureCallbackTime;
- mTotalJpegPictureCallbackTimeLag += Camera.mJpegPictureCallbackTimeLag;
+ c.mShutterAndRawPictureCallbackTime;
+ mTotalJpegPictureCallbackTimeLag += c.mJpegPictureCallbackTimeLag;
mTotalRawPictureAndJpegPictureCallbackTime +=
- Camera.mRawPictureAndJpegPictureCallbackTime;
+ c.mRawPictureAndJpegPictureCallbackTime;
}
}
} catch (Exception e) {