summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Bestas <mikeioannina@gmail.com>2014-10-24 11:26:25 +0300
committerMichael Bestas <mikeioannina@gmail.com>2015-09-17 23:26:02 +0300
commitfb4957c0017b1aa47fa643c1c6fa9179fe8ebd29 (patch)
tree56ebbe38d6bb75f236c49fd6f6b4a90fddd7e2e9
parente34ec5cfdabbf983e8089e8f7302c70b3c4dd8d6 (diff)
downloadandroid_packages_apps_Snap-fb4957c0017b1aa47fa643c1c6fa9179fe8ebd29.zip
android_packages_apps_Snap-fb4957c0017b1aa47fa643c1c6fa9179fe8ebd29.tar.gz
android_packages_apps_Snap-fb4957c0017b1aa47fa643c1c6fa9179fe8ebd29.tar.bz2
Camera2: Remove CAF video duration code
Change-Id: I583e212f3c43a5ddf80fdb16557b3ddd9e3161c2
-rw-r--r--res/values/qcomarrays.xml16
-rw-r--r--res/values/qcomstrings.xml9
-rw-r--r--res/xml/video_preferences.xml7
-rw-r--r--src/com/android/camera/CameraSettings.java20
-rw-r--r--src/com/android/camera/VideoMenu.java2
-rw-r--r--src/com/android/camera/VideoModule.java21
6 files changed, 1 insertions, 74 deletions
diff --git a/res/values/qcomarrays.xml b/res/values/qcomarrays.xml
index 3af2153..a746ba1 100644
--- a/res/values/qcomarrays.xml
+++ b/res/values/qcomarrays.xml
@@ -553,22 +553,6 @@
<item>aac</item>
</string-array>
- <!-- Camera Preferences Video Duration dialog box entries -->
- <string-array name="pref_camera_video_duration_entries" translatable="false">
- <item>@string/pref_camera_video_duration_entry_mms</item>
- <item>@string/pref_camera_video_duration_entry_10</item>
- <item>@string/pref_camera_video_duration_entry_30</item>
- <item>@string/pref_camera_video_duration_entry_nolimit</item>
- </string-array>
-
- <!-- The numbers are in minutes, except -1 means the duration suitable for mms. -->
- <string-array name="pref_camera_video_duration_entryvalues" translatable="false">
- <item>-1</item>
- <item>10</item>
- <item>30</item>
- <item>0</item>
- </string-array>
-
<!-- Camera Preferences Skin Tone Enhancement dialog box entries -->
<string-array name="pref_camera_skinToneEnhancement_entries">
<item>@string/pref_camera_skinToneEnhancement_entry_enable</item>
diff --git a/res/values/qcomstrings.xml b/res/values/qcomstrings.xml
index 367a226..c7fff0f 100644
--- a/res/values/qcomstrings.xml
+++ b/res/values/qcomstrings.xml
@@ -92,15 +92,6 @@
<!-- Default video duration setting. A numerical value.-->
<string name="pref_camera_video_duration_default" translatable="false">10</string>
- <!-- Settings screen, Video duration title -->
- <string name="pref_camera_video_duration_title">Video duration</string>
-
- <!-- Settings screen, Video duration dialog radio button choices -->
- <string name="pref_camera_video_duration_entry_mms">30 seconds(MMS)</string>
- <string name="pref_camera_video_duration_entry_10">10 minutes</string>
- <string name="pref_camera_video_duration_entry_30">30 minutes</string>
- <string name="pref_camera_video_duration_entry_nolimit">no limit</string>
-
<!-- Default Skin Tone Enhancement setting. Do not translate. -->
<string name="pref_camera_skinToneEnhancement_default">disable</string>
diff --git a/res/xml/video_preferences.xml b/res/xml/video_preferences.xml
index 31b2d4c..259ad81 100644
--- a/res/xml/video_preferences.xml
+++ b/res/xml/video_preferences.xml
@@ -48,13 +48,6 @@
camera:entries="@array/pref_camera_video_tnr_entries"
camera:entryValues="@array/pref_camera_video_tnr_entryvalues" />
<IconListPreference
- camera:key="pref_camera_video_duration_key"
- camera:defaultValue="@string/pref_camera_video_duration_default"
- camera:title="@string/pref_camera_video_duration_title"
- camera:singleIcon="@drawable/ic_settings_duration"
- camera:entries="@array/pref_camera_video_duration_entries"
- camera:entryValues="@array/pref_camera_video_duration_entryvalues" />
- <IconListPreference
camera:key="pref_video_time_lapse_frame_interval_key"
camera:defaultValue="@string/pref_video_time_lapse_frame_interval_default"
camera:title="@string/pref_video_time_lapse_frame_interval_title"
diff --git a/src/com/android/camera/CameraSettings.java b/src/com/android/camera/CameraSettings.java
index a464217..9004dd2 100644
--- a/src/com/android/camera/CameraSettings.java
+++ b/src/com/android/camera/CameraSettings.java
@@ -79,7 +79,6 @@ public class CameraSettings {
public static final String KEY_VIDEO_ENCODER = "pref_camera_videoencoder_key";
public static final String KEY_AUDIO_ENCODER = "pref_camera_audioencoder_key";
- public static final String KEY_VIDEO_DURATION = "pref_camera_video_duration_key";
public static final String KEY_POWER_MODE = "pref_camera_powermode_key";
public static final String KEY_PICTURE_FORMAT = "pref_camera_pictureformat_key";
public static final String KEY_ZSL = "pref_camera_zsl_key";
@@ -182,10 +181,6 @@ public class CameraSettings {
private static final String KEY_QC_PICTURE_FORMAT = "picture-format-values";
public static final String KEY_VIDEO_ROTATION = "pref_camera_video_rotation_key";
- private static final String VIDEO_QUALITY_HIGH = "high";
- private static final String VIDEO_QUALITY_MMS = "mms";
- private static final String VIDEO_QUALITY_YOUTUBE = "youtube";
-
//manual 3A keys and parameter strings
public static final String KEY_MANUAL_EXPOSURE = "pref_camera_manual_exp_key";
@@ -244,11 +239,6 @@ public class CameraSettings {
public static final int CURRENT_VERSION = 5;
public static final int CURRENT_LOCAL_VERSION = 2;
- public static final int DEFAULT_VIDEO_DURATION = 0; // no limit
- private static final int MMS_VIDEO_DURATION = (CamcorderProfile.get(CamcorderProfile.QUALITY_LOW) != null) ?
- CamcorderProfile.get(CamcorderProfile.QUALITY_LOW).duration :30;
- private static final int YOUTUBE_VIDEO_DURATION = 15 * 60; // 15 mins
-
private static final String TAG = "CameraSettings";
private final Context mContext;
@@ -1049,7 +1039,6 @@ public class CameraSettings {
// Just use video quality to replace it and
// ignore the current settings.
editor.remove("pref_camera_videoquality_key");
- editor.remove("pref_camera_video_duration_key");
}
editor.putInt(KEY_VERSION, CURRENT_VERSION);
@@ -1233,7 +1222,6 @@ public class CameraSettings {
supported.add(Integer.toString(CamcorderProfile.QUALITY_QCIF));
}
}
-
}
public static ArrayList<String> getSupportedVideoQualities(int cameraId,Parameters parameters) {
@@ -1249,14 +1237,6 @@ public class CameraSettings {
}
return supported;
}
- public static int getVideoDurationInMillis(String quality) {
- if (VIDEO_QUALITY_MMS.equals(quality)) {
- return MMS_VIDEO_DURATION * 1000;
- } else if (VIDEO_QUALITY_YOUTUBE.equals(quality)) {
- return YOUTUBE_VIDEO_DURATION * 1000;
- }
- return DEFAULT_VIDEO_DURATION * 1000;
- }
public static boolean isInternalPreviewSupported(Parameters params) {
boolean ret = false;
diff --git a/src/com/android/camera/VideoMenu.java b/src/com/android/camera/VideoMenu.java
index da5c062..d4c3320 100644
--- a/src/com/android/camera/VideoMenu.java
+++ b/src/com/android/camera/VideoMenu.java
@@ -109,7 +109,6 @@ public class VideoMenu extends MenuController
mOtherKeys1 = new String[] {
CameraSettings.KEY_VIDEOCAMERA_FLASH_MODE,
CameraSettings.KEY_VIDEO_QUALITY,
- CameraSettings.KEY_VIDEO_DURATION,
CameraSettings.KEY_RECORD_LOCATION,
CameraSettings.KEY_CAMERA_SAVEPATH,
CameraSettings.KEY_WHITE_BALANCE,
@@ -118,7 +117,6 @@ public class VideoMenu extends MenuController
mOtherKeys2 = new String[] {
CameraSettings.KEY_VIDEOCAMERA_FLASH_MODE,
CameraSettings.KEY_VIDEO_QUALITY,
- CameraSettings.KEY_VIDEO_DURATION,
CameraSettings.KEY_RECORD_LOCATION,
CameraSettings.KEY_CAMERA_SAVEPATH,
CameraSettings.KEY_WHITE_BALANCE,
diff --git a/src/com/android/camera/VideoModule.java b/src/com/android/camera/VideoModule.java
index ad25dc3..e509549 100644
--- a/src/com/android/camera/VideoModule.java
+++ b/src/com/android/camera/VideoModule.java
@@ -734,25 +734,6 @@ public class VideoModule implements CameraModule,
Log.v(TAG, "Audio Encoder selected = " +mAudioEncoder);
- String minutesStr = mPreferences.getString(
- CameraSettings.KEY_VIDEO_DURATION,
- mActivity.getString(R.string.pref_camera_video_duration_default));
- int minutes = -1;
- try {
- minutes = Integer.parseInt(minutesStr);
- } catch(NumberFormatException npe) {
- // use default value continue
- minutes = Integer.parseInt(mActivity.getString(
- R.string.pref_camera_video_duration_default));
- }
- if (minutes == -1) {
- // User wants lowest, set 30s */
- mMaxVideoDurationInMs = 30000;
- } else {
- // 1 minute = 60000ms
- mMaxVideoDurationInMs = 60000 * minutes;
- }
-
if(mParameters.isPowerModeSupported()) {
String powermode = mPreferences.getString(
CameraSettings.KEY_POWER_MODE,
@@ -771,7 +752,7 @@ public class VideoModule implements CameraModule,
mActivity.getString(R.string.pref_camera_denoise_default));
mParameters.setDenoise(denoise);
}
- }
+ }
private void readVideoPreferences() {
// The preference stores values from ListPreference and is thus string type for all values.