summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/com/android/camera/Camera.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/com/android/camera/Camera.java b/src/com/android/camera/Camera.java
index 1db7862..fe6b1c7 100644
--- a/src/com/android/camera/Camera.java
+++ b/src/com/android/camera/Camera.java
@@ -1116,10 +1116,14 @@ public class Camera extends Activity implements View.OnClickListener,
}
}
+ private boolean canTakePicture() {
+ return isCameraIdle() && mPreviewing && (mPicturesRemaining > 0);
+ }
+
private void autoFocus() {
// Initiate autofocus only when preview is started and snapshot is not
// in progress.
- if (isCameraIdle() && mPreviewing) {
+ if (canTakePicture()) {
Log.v(TAG, "Start autofocus.");
if (mZoomButtons != null) mZoomButtons.setVisible(false);
mFocusStartTime = System.currentTimeMillis();