summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichael Bestas <mikeioannina@cyanogenmod.org>2016-01-11 01:36:39 +0200
committerMichael Bestas <mikeioannina@cyanogenmod.org>2016-01-11 03:28:02 +0200
commit3615cea5b00e3fc2987359bf8cf3895f646a7103 (patch)
treebbefbfd81685b7a68ae7a543d2b1b26521c127ee /src
parentbc69af7c6e8683594bb74c5211d086d3a3f17797 (diff)
downloadandroid_packages_apps_Snap-3615cea5b00e3fc2987359bf8cf3895f646a7103.tar.gz
android_packages_apps_Snap-3615cea5b00e3fc2987359bf8cf3895f646a7103.tar.bz2
android_packages_apps_Snap-3615cea5b00e3fc2987359bf8cf3895f646a7103.zip
Snap: Fall back to default quality instead of 352x288
* Not all devices support this resolution Change-Id: I42d2037b4e32c7f5c88a60b5da1895dcb761d176
Diffstat (limited to 'src')
-rw-r--r--src/com/android/camera/VideoModule.java11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/com/android/camera/VideoModule.java b/src/com/android/camera/VideoModule.java
index 3b0e52689..bd1f0e25d 100644
--- a/src/com/android/camera/VideoModule.java
+++ b/src/com/android/camera/VideoModule.java
@@ -850,9 +850,8 @@ public class VideoModule implements CameraModule,
private void readVideoPreferences() {
// The preference stores values from ListPreference and is thus string type for all values.
// We need to convert it to int manually.
- String videoQuality = mPreferences.getString(CameraSettings.KEY_VIDEO_QUALITY,
- null);
- if (videoQuality == null) {
+ String videoQuality = mPreferences.getString(CameraSettings.KEY_VIDEO_QUALITY, null);
+ if (videoQuality == null || (videoQuality.length() < 3 && !videoQuality.contains("x"))) {
mParameters = mCameraDevice.getParameters();
String defaultQuality = mActivity.getResources().getString(
R.string.pref_video_quality_default);
@@ -869,12 +868,6 @@ public class VideoModule implements CameraModule,
mPreferences.edit().putString(CameraSettings.KEY_VIDEO_QUALITY, videoQuality).apply();
}
- // videoQuality must be at least 3 chars long (1x1) and contain the letter "x"
- if (videoQuality.length() < 3 && !videoQuality.contains("x")) {
- Log.e(TAG, "Invalid video quality " + videoQuality + ". Fallback to 352x288.");
- videoQuality = "352x288";
- }
-
int quality = CameraSettings.VIDEO_QUALITY_TABLE.get(videoQuality);
// Set video quality.