summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichael Bestas <mikeioannina@cyanogenmod.org>2016-01-11 01:36:39 +0200
committerArne Coucheron <arco68@gmail.com>2018-01-26 01:02:46 +0100
commitcf03c6f4d06f67a8cfa406a4c9786f806900a538 (patch)
tree479c22c250d1157bc2b38751b92703c8c1d40548 /src
parent81e73f8197cbfe7941de03a1dec53b1cae106e81 (diff)
downloadandroid_packages_apps_Snap-cf03c6f4d06f67a8cfa406a4c9786f806900a538.tar.gz
android_packages_apps_Snap-cf03c6f4d06f67a8cfa406a4c9786f806900a538.tar.bz2
android_packages_apps_Snap-cf03c6f4d06f67a8cfa406a4c9786f806900a538.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 195b40a6b..db927c2a6 100644
--- a/src/com/android/camera/VideoModule.java
+++ b/src/com/android/camera/VideoModule.java
@@ -873,9 +873,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);
@@ -892,12 +891,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.