summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJay Wang <jaywang@codeaurora.org>2016-07-20 16:55:06 -0700
committerJay Wang <jaywang@codeaurora.org>2016-07-20 17:15:27 -0700
commitf4291b0ad6a3aab4ddafe759513cf38f4976e8e4 (patch)
tree6c4e41766ff731e6ffa2aba0f601e28c2f86cdfd
parentcfbfa14182d1d726bbe0856da8949e6a847a8ece (diff)
downloadandroid_packages_apps_Snap-f4291b0ad6a3aab4ddafe759513cf38f4976e8e4.tar.gz
android_packages_apps_Snap-f4291b0ad6a3aab4ddafe759513cf38f4976e8e4.tar.bz2
android_packages_apps_Snap-f4291b0ad6a3aab4ddafe759513cf38f4976e8e4.zip
SnapdragonCamera: Add a persist setting to remvoe 4K limitation
When persist.camcorder.4k.nolimit is set to true, application allows the user to enable EIS and SeeMore at 4K resolution Change-Id: Ia838f78aa0d7dbdc981bf61b4640e2504d9ab75d CRs-Fixed: 1043548
-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 612660450..8bb878f2c 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,
@@ -2701,7 +2704,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);