summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorrepo syn && make -j4 <raychen@google.com>2009-08-06 18:41:42 -0700
committerRay Chen <raychen@google.com>2009-08-06 18:53:37 -0700
commitfcb65124480c7a07d8cb1b28eff3c6acd6107531 (patch)
treec4e6fd184b28a08ad5a142b44d4ff4f278f3964a /src
parent69bd2716384e95e42435268618c33902120ea8ea (diff)
downloadpackages_apps_LegacyCamera-fcb65124480c7a07d8cb1b28eff3c6acd6107531.zip
packages_apps_LegacyCamera-fcb65124480c7a07d8cb1b28eff3c6acd6107531.tar.gz
packages_apps_LegacyCamera-fcb65124480c7a07d8cb1b28eff3c6acd6107531.tar.bz2
Fix issue 2039521: Pressing back key doesn't work.
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();