summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/Camera.java
diff options
context:
space:
mode:
authorWu-cheng Li <wuchengli@google.com>2010-12-22 12:07:48 +0800
committerWu-cheng Li <wuchengli@google.com>2011-01-05 13:37:14 +0800
commit894696f3f9f068a23696bbd05a5e9fc0d9ae5720 (patch)
tree3b5b5687aba9b187e5482a8cfbcc54d1e13e907e /src/com/android/camera/Camera.java
parent2de93f3894b740b1af9ed3a1e2876a397f310832 (diff)
downloadLegacyCamera-894696f3f9f068a23696bbd05a5e9fc0d9ae5720.zip
LegacyCamera-894696f3f9f068a23696bbd05a5e9fc0d9ae5720.tar.gz
LegacyCamera-894696f3f9f068a23696bbd05a5e9fc0d9ae5720.tar.bz2
Play the focus tone only when focus succeeds.
bug:3109218 Change-Id: I6110085a02931b457a8bf71b2f6c783c93fdd825
Diffstat (limited to 'src/com/android/camera/Camera.java')
-rw-r--r--src/com/android/camera/Camera.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/com/android/camera/Camera.java b/src/com/android/camera/Camera.java
index 13947b7..f37df10 100644
--- a/src/com/android/camera/Camera.java
+++ b/src/com/android/camera/Camera.java
@@ -744,12 +744,11 @@ public class Camera extends NoSearchActivity implements View.OnClickListener,
} else if (mFocusState == FOCUSING) {
// User is half-pressing the focus key. Play the focus tone.
// Do not take the picture now.
- ToneGenerator tg = mFocusToneGenerator;
- if (tg != null) {
- tg.startTone(ToneGenerator.TONE_PROP_BEEP2);
- }
if (focused) {
mFocusState = FOCUS_SUCCESS;
+ if (mFocusToneGenerator != null) {
+ mFocusToneGenerator.startTone(ToneGenerator.TONE_PROP_BEEP2);
+ }
} else {
mFocusState = FOCUS_FAIL;
}