summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--res/values/cm_arrays.xml4
-rw-r--r--res/values/cm_strings.xml1
-rw-r--r--src/com/android/camera/FocusOverlayManager.java23
3 files changed, 19 insertions, 9 deletions
diff --git a/res/values/cm_arrays.xml b/res/values/cm_arrays.xml
index 7a1aede..1a44ad1 100644
--- a/res/values/cm_arrays.xml
+++ b/res/values/cm_arrays.xml
@@ -27,6 +27,7 @@
<!-- Touch focus duration -->
<string-array name="pref_camera_focustime_duration_entries" translatable="false">
+ <item>@string/pref_camera_focustime_entry_0</item>
<item>@string/pref_camera_focustime_entry_5</item>
<item>@string/pref_camera_focustime_entry_10</item>
<item>@string/pref_camera_focustime_entry_15</item>
@@ -37,12 +38,13 @@
<!-- Stored in milliseconds -->
<string-array name="pref_camera_focustime_duration_values" translatable="false">
+ <item>200</item>
<item>5000</item>
<item>10000</item>
<item>15000</item>
<item>20000</item>
<item>30000</item>
- <item>0</item>
+ <item>0x7FFFFFFF</item>
</string-array>
<!-- Shutter speed -->
diff --git a/res/values/cm_strings.xml b/res/values/cm_strings.xml
index c0ddc5a..03b14af 100644
--- a/res/values/cm_strings.xml
+++ b/res/values/cm_strings.xml
@@ -200,6 +200,7 @@
<string name="pref_camera_focustime_title">Touch focus duration</string>
<string name="pref_camera_focustime_default" translatable="false">5000</string>
+ <string name="pref_camera_focustime_entry_0">0s</string>
<string name="pref_camera_focustime_entry_5">5s</string>
<string name="pref_camera_focustime_entry_10">10s</string>
<string name="pref_camera_focustime_entry_15">15s</string>
diff --git a/src/com/android/camera/FocusOverlayManager.java b/src/com/android/camera/FocusOverlayManager.java
index 5fcc8e9..4052377 100644
--- a/src/com/android/camera/FocusOverlayManager.java
+++ b/src/com/android/camera/FocusOverlayManager.java
@@ -269,8 +269,10 @@ public class FocusOverlayManager {
if (focused) {
mState = STATE_SUCCESS;
// Lock exposure and white balance
- setAeAwbLock(true);
- mListener.setFocusParameters();
+ if (mFocusTime != 200) {
+ setAeAwbLock(true);
+ mListener.setFocusParameters();
+ }
} else {
mState = STATE_FAIL;
}
@@ -282,14 +284,16 @@ public class FocusOverlayManager {
if (focused) {
mState = STATE_SUCCESS;
// Lock exposure and white balance
- setAeAwbLock(true);
- mListener.setFocusParameters();
+ if (mFocusTime != 200) {
+ setAeAwbLock(true);
+ mListener.setFocusParameters();
+ }
} else {
mState = STATE_FAIL;
}
// If this is triggered by touch focus, cancel focus after a
// while.
- if ((mFocusArea != null) && (mFocusTime != 0)) {
+ if (mFocusArea != null) {
mHandler.sendEmptyMessageDelayed(RESET_TOUCH_FOCUS, mFocusTime);
}
if (shutterButtonPressed) {
@@ -389,15 +393,18 @@ public class FocusOverlayManager {
// Stop face detection because we want to specify focus and metering area.
mListener.stopFaceDetection();
+ if (mFocusTime == 200) {
+ setAeAwbLock(true);
+ mListener.setFocusParameters();
+ }
+
// Set the focus area and metering area.
mListener.setFocusParameters();
if (mFocusAreaSupported) {
autoFocus();
} else { // Just show the indicator in all other cases.
mHandler.removeMessages(RESET_TOUCH_FOCUS);
- if (mFocusTime != 0) {
- mHandler.sendEmptyMessageDelayed(RESET_TOUCH_FOCUS, mFocusTime);
- }
+ mHandler.sendEmptyMessageDelayed(RESET_TOUCH_FOCUS, mFocusTime);
}
}