summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Bestas <mikeioannina@cyanogenmod.org>2016-01-13 18:25:29 +0200
committerArne Coucheron <arco68@gmail.com>2018-01-26 01:08:12 +0100
commitc5868ca8f4f885bc616e0050e4b744b0640f664d (patch)
tree7a51323d3e6122abb59825ae60130b10a7301ed4
parente0551bc09e8564fab0f169382b8ce270093cdd75 (diff)
downloadandroid_packages_apps_Snap-c5868ca8f4f885bc616e0050e4b744b0640f664d.zip
android_packages_apps_Snap-c5868ca8f4f885bc616e0050e4b744b0640f664d.tar.gz
android_packages_apps_Snap-c5868ca8f4f885bc616e0050e4b744b0640f664d.tar.bz2
Snap: Add focus time support in camcorder
Change-Id: I5432554a40d7375ed7893c38cb2741a12cc8cc80
-rw-r--r--res/xml/video_preferences.xml6
-rw-r--r--src/com/android/camera/CameraSettings.java1
-rw-r--r--src/com/android/camera/VideoMenu.java2
-rw-r--r--src/com/android/camera/VideoModule.java5
4 files changed, 14 insertions, 0 deletions
diff --git a/res/xml/video_preferences.xml b/res/xml/video_preferences.xml
index a699d26..56bcfcb 100644
--- a/res/xml/video_preferences.xml
+++ b/res/xml/video_preferences.xml
@@ -190,6 +190,12 @@
camera:entries="@array/pref_video_focusmode_entries"
camera:entryValues="@array/pref_video_focusmode_entryvalues" />
<ListPreference
+ camera:key="pref_camera_video_focustime_key"
+ camera:defaultValue="@string/pref_camera_focustime_default"
+ camera:title="@string/pref_camera_focustime_title"
+ camera:entries="@array/pref_camera_focustime_duration_entries"
+ camera:entryValues="@array/pref_camera_focustime_duration_values" />
+ <ListPreference
camera:key="pref_camera_antibanding_key"
camera:defaultValue="@string/pref_camera_antibanding_default"
camera:title="@string/pref_camera_antibanding_title"
diff --git a/src/com/android/camera/CameraSettings.java b/src/com/android/camera/CameraSettings.java
index 9be4296..1958632 100644
--- a/src/com/android/camera/CameraSettings.java
+++ b/src/com/android/camera/CameraSettings.java
@@ -70,6 +70,7 @@ public class CameraSettings {
public static final String KEY_FOCUS_MODE = "pref_camera_focusmode_key";
public static final String KEY_VIDEOCAMERA_FOCUS_MODE = "pref_camera_video_focusmode_key";
public static final String KEY_FOCUS_TIME = "pref_camera_focustime_key";
+ public static final String KEY_VIDEOCAMERA_FOCUS_TIME = "pref_camera_video_focustime_key";
public static final String KEY_FLASH_MODE = "pref_camera_flashmode_key";
public static final String KEY_VIDEOCAMERA_FLASH_MODE = "pref_camera_video_flashmode_key";
public static final String KEY_WHITE_BALANCE = "pref_camera_whitebalance_key";
diff --git a/src/com/android/camera/VideoMenu.java b/src/com/android/camera/VideoMenu.java
index 70e394e..0bf6a14 100644
--- a/src/com/android/camera/VideoMenu.java
+++ b/src/com/android/camera/VideoMenu.java
@@ -116,6 +116,7 @@ public class VideoMenu extends MenuController
CameraSettings.KEY_VIDEOCAMERA_FLASH_MODE,
CameraSettings.KEY_VIDEO_QUALITY,
CameraSettings.KEY_VIDEOCAMERA_FOCUS_MODE,
+ CameraSettings.KEY_VIDEOCAMERA_FOCUS_TIME,
CameraSettings.KEY_RECORD_LOCATION,
CameraSettings.KEY_CAMERA_SAVEPATH,
CameraSettings.KEY_EXPOSURE,
@@ -130,6 +131,7 @@ public class VideoMenu extends MenuController
CameraSettings.KEY_VIDEO_QUALITY,
CameraSettings.KEY_VIDEO_SNAPSHOT_SIZE,
CameraSettings.KEY_VIDEOCAMERA_FOCUS_MODE,
+ CameraSettings.KEY_VIDEOCAMERA_FOCUS_TIME,
CameraSettings.KEY_RECORD_LOCATION,
CameraSettings.KEY_CAMERA_SAVEPATH,
CameraSettings.KEY_EXPOSURE,
diff --git a/src/com/android/camera/VideoModule.java b/src/com/android/camera/VideoModule.java
index 0bd6649..c72939b 100644
--- a/src/com/android/camera/VideoModule.java
+++ b/src/com/android/camera/VideoModule.java
@@ -2839,6 +2839,11 @@ public class VideoModule implements CameraModule,
// Set focus mode
mParameters.setFocusMode(mFocusManager.getFocusMode(true));
+ // Set focus time.
+ mFocusManager.setFocusTime(Integer.valueOf(
+ mPreferences.getString(CameraSettings.KEY_VIDEOCAMERA_FOCUS_TIME,
+ mActivity.getString(R.string.pref_camera_focustime_default))));
+
// Set face detetction parameter.
String faceDetection = mPreferences.getString(
CameraSettings.KEY_FACE_DETECTION,