diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2015-09-10 15:08:28 -0700 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2015-09-10 15:08:28 -0700 |
commit | 8326a45a80dac23f3821f38036a071c269527d8a (patch) | |
tree | 7dacd88d52d037d921e18e0cf43c97bc36ce69a6 /src | |
parent | ed5330c39beb937fdb97a5f7c100232fab29f915 (diff) | |
parent | d63d1133742bd03b13a1bbf6dce031291cf9729d (diff) | |
download | android_packages_apps_Snap-8326a45a80dac23f3821f38036a071c269527d8a.tar.gz android_packages_apps_Snap-8326a45a80dac23f3821f38036a071c269527d8a.tar.bz2 android_packages_apps_Snap-8326a45a80dac23f3821f38036a071c269527d8a.zip |
Merge "SnapdragonCamera: limit longshot captures"
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/camera/PhotoModule.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/com/android/camera/PhotoModule.java b/src/com/android/camera/PhotoModule.java index f95d40564..c487aa1c7 100644 --- a/src/com/android/camera/PhotoModule.java +++ b/src/com/android/camera/PhotoModule.java @@ -196,6 +196,9 @@ public class PhotoModule private boolean mRefocus = false; private boolean mLastPhotoTakenWithRefocus = false; + private int mLongShotCaptureCount; + private int mLongShotCaptureCountLimit; + // The degrees of the device rotated clockwise from its natural orientation. private int mOrientation = OrientationEventListener.ORIENTATION_UNKNOWN; private ComboPreferences mPreferences; @@ -968,9 +971,16 @@ public class PhotoModule return; } + if(mLongShotCaptureCount == mLongShotCaptureCountLimit) { + mLongshotActive = false; + return; + } + mUI.doShutterAnimation(); Location loc = getLocationAccordPictureFormat(mParameters.get(KEY_PICTURE_FORMAT)); + + mLongShotCaptureCount++; if (mLongshotSave) { mCameraDevice.takePicture(mHandler, new LongshotShutterCallback(), @@ -1558,6 +1568,9 @@ public class PhotoModule } if (mCameraState == LONGSHOT) { + mLongShotCaptureCountLimit = SystemProperties.getInt( + "persist.camera.longshot.shotnum", 0); + mLongShotCaptureCount = 1; if(mLongshotSave) { mCameraDevice.takePicture(mHandler, new LongshotShutterCallback(), |