summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2016-07-25 21:06:07 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2016-07-25 21:06:07 -0700
commit48142b9f3cf7e6d7a6266ba626b656ecd4f221ce (patch)
treee1f852f4154c46de6a3d6e7c43707214ccc5071b
parentc59f23259d0f7b18d1a3a8280246b1546800de1a (diff)
parentf4291b0ad6a3aab4ddafe759513cf38f4976e8e4 (diff)
downloadandroid_packages_apps_Snap-48142b9f3cf7e6d7a6266ba626b656ecd4f221ce.tar.gz
android_packages_apps_Snap-48142b9f3cf7e6d7a6266ba626b656ecd4f221ce.tar.bz2
android_packages_apps_Snap-48142b9f3cf7e6d7a6266ba626b656ecd4f221ce.zip
Merge "SnapdragonCamera: Add a persist setting to remvoe 4K limitation" into camera.lnx.1.0-dev.1.0
-rw-r--r--src/com/android/camera/VideoMenu.java10
-rwxr-xr-xsrc/com/android/camera/VideoModule.java8
2 files changed, 13 insertions, 5 deletions
diff --git a/src/com/android/camera/VideoMenu.java b/src/com/android/camera/VideoMenu.java
index 670572774..c44a04b94 100644
--- a/src/com/android/camera/VideoMenu.java
+++ b/src/com/android/camera/VideoMenu.java
@@ -90,6 +90,9 @@ public class VideoMenu extends MenuController
private static final int CLICK_THRESHOLD = 200;
private int previewMenuSize;
+ private static final boolean PERSIST_4K_NO_LIMIT =
+ android.os.SystemProperties.getBoolean("persist.camcorder.4k.nolimit", false);
+
public VideoMenu(CameraActivity activity, VideoUI ui) {
super(activity);
mUI = ui;
@@ -683,11 +686,12 @@ public class VideoMenu extends MenuController
}
}
private void overrideMenuFor4K() {
- if(mUI.is4KEnabled()) {
+ if(mUI.is4KEnabled() && !PERSIST_4K_NO_LIMIT) {
+
mListMenu.setPreferenceEnabled(
- CameraSettings.KEY_DIS,false);
+ CameraSettings.KEY_DIS,false);
mListMenu.overrideSettings(
- CameraSettings.KEY_DIS, "disable");
+ CameraSettings.KEY_DIS, "disable");
mListMenu.setPreferenceEnabled(
CameraSettings.KEY_SEE_MORE, false);
diff --git a/src/com/android/camera/VideoModule.java b/src/com/android/camera/VideoModule.java
index e9985e8e7..ab576acb6 100755
--- a/src/com/android/camera/VideoModule.java
+++ b/src/com/android/camera/VideoModule.java
@@ -216,6 +216,9 @@ public class VideoModule implements CameraModule,
private boolean mFaceDetectionEnabled = false;
private boolean mFaceDetectionStarted = false;
+ private static final boolean PERSIST_4K_NO_LIMIT =
+ android.os.SystemProperties.getBoolean("persist.camcorder.4k.nolimit", false);
+
private final MediaSaveService.OnMediaSavedListener mOnVideoSavedListener =
new MediaSaveService.OnMediaSavedListener() {
@Override
@@ -2223,7 +2226,7 @@ public class VideoModule implements CameraModule,
Log.v(TAG, "DIS value =" + disMode);
mIsDISEnabled = disMode.equals("enable");
- if (is4KEnabled()) {
+ if (is4KEnabled() && !PERSIST_4K_NO_LIMIT) {
if (isSupported(mActivity.getString(R.string.pref_camera_dis_value_disable),
CameraSettings.getSupportedDISModes(mParameters))) {
mParameters.set(CameraSettings.KEY_QC_DIS_MODE,
@@ -2698,7 +2701,8 @@ public class VideoModule implements CameraModule,
@Override
public void onSharedPreferenceChanged(ListPreference pref) {
- if (pref != null && CameraSettings.KEY_VIDEO_QUALITY.equals(pref.getKey())) {
+ if (pref != null && CameraSettings.KEY_VIDEO_QUALITY.equals(pref.getKey())
+ && !PERSIST_4K_NO_LIMIT) {
String videoQuality = pref.getValue();
if (CameraSettings.VIDEO_QUALITY_TABLE.containsKey(videoQuality)) {
int quality = CameraSettings.VIDEO_QUALITY_TABLE.get(videoQuality);