summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Keith <javelinanddart@gmail.com>2018-01-09 01:33:00 +0100
committerPaul Keith <javelinanddart@gmail.com>2018-01-09 01:49:30 +0100
commit383470abbae703ccac8353c590ed4dd7c906f3a4 (patch)
tree323f582a57efa16699eaa50f3a37d6c7ba58e6c8
parentc89f3ae74269284a8658e57560d0ab0797a072d4 (diff)
downloadandroid_packages_apps_Snap-383470abbae703ccac8353c590ed4dd7c906f3a4.zip
android_packages_apps_Snap-383470abbae703ccac8353c590ed4dd7c906f3a4.tar.gz
android_packages_apps_Snap-383470abbae703ccac8353c590ed4dd7c906f3a4.tar.bz2
Snap: Rip out hdr-need-1x option
* This breaks HDR on every device that has this param, because this makes the camera HAL return *1* e*x*tra frame at 0 exposure, and since Snap doesn't know what to do with this extra frame, it erroneously saves it as a second picture on device storage * Remove this option entirely to make HDR great again Change-Id: I8ef4072eb030f4ab6e608a0da268274a3dc58e34
-rw-r--r--res/drawable/ic_settings_onex.xml14
-rw-r--r--res/values/qcomarrays.xml12
-rw-r--r--res/values/qcomstrings.xml14
-rw-r--r--res/xml/camera_preferences.xml7
-rw-r--r--src/com/android/camera/CameraSettings.java17
-rw-r--r--src/com/android/camera/PhotoMenu.java1
-rw-r--r--src/com/android/camera/PhotoModule.java10
7 files changed, 1 insertions, 74 deletions
diff --git a/res/drawable/ic_settings_onex.xml b/res/drawable/ic_settings_onex.xml
deleted file mode 100644
index 5d5efd9..0000000
--- a/res/drawable/ic_settings_onex.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="24dp"
- android:height="24dp"
- android:viewportWidth="24"
- android:viewportHeight="24">
-
- <path
- android:pathData="M0 0h24v24H0z" />
- <path
- android:fillColor="@color/white"
- android:pathData="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1 .9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-5
-14h-2V9h-2V7h4v10z" />
-</vector>
diff --git a/res/values/qcomarrays.xml b/res/values/qcomarrays.xml
index 16e9c4e..0b3d33d 100644
--- a/res/values/qcomarrays.xml
+++ b/res/values/qcomarrays.xml
@@ -781,17 +781,7 @@
<item>@string/pref_hdr_mode_value_multi_frame</item>
</string-array>
- <!-- Camera Preferences Selectable HDR need 1x frame -->
- <string-array name="pref_camera_hdr_need_1x_entries" translatable="false">
- <item>@string/pref_camera_hdr_need_1x_entry_false</item>
- <item>@string/pref_camera_hdr_need_1x_entry_true</item>
- </string-array>
-
- <string-array name="pref_camera_hdr_need_1x_entryvalues" translatable="false">
- <item>@string/pref_hdr_need_1x_value_false</item>
- <item>@string/pref_hdr_need_1x_value_true</item>
- </string-array>
- <string-array name="pref_camera_tsmakeup_entries">
+ <string-array name="pref_camera_tsmakeup_entries">
<item>@string/pref_camera_tsmakeup_entry_off</item>
<item>@string/pref_camera_tsmakeup_entry_on</item>
</string-array>
diff --git a/res/values/qcomstrings.xml b/res/values/qcomstrings.xml
index 97ca0de..56463ae 100644
--- a/res/values/qcomstrings.xml
+++ b/res/values/qcomstrings.xml
@@ -808,20 +808,6 @@
<string name="pref_hdr_mode_value_sensor" translatable="false">hdr-mode-sensor</string>
<string name="pref_hdr_mode_value_multi_frame" translatable="false">hdr-mode-multiframe</string>
- <!-- Settings screen, Selectable HDR need 1x frame default value -->
- <string name="pref_camera_hdr_need_1x_default" translatable="false">@string/pref_hdr_need_1x_value_true</string>
-
- <!-- Settings screen, Selectable HDR need 1x frame title -->
- <string name="pref_camera_hdr_need_1x_title">HDR needs 1x frame</string>
-
- <!-- Settings screen, Selectable HDR need 1x frame radio button choices -->
- <string name="pref_camera_hdr_need_1x_entry_false" translatable="false">@string/setting_off</string>
- <string name="pref_camera_hdr_need_1x_entry_true" translatable="false">@string/setting_on</string>
-
- <!-- HDR need 1x frame entry values. Do not translate. -->
- <string name="pref_hdr_need_1x_value_false" translatable="false">false</string>
- <string name="pref_hdr_need_1x_value_true" translatable="false">true</string>
-
<!--Default video rotation setting-->
<string name="pref_camera_video_rotation_default" translatable="false">0</string>
diff --git a/res/xml/camera_preferences.xml b/res/xml/camera_preferences.xml
index 39bc9cb..9508bd7 100644
--- a/res/xml/camera_preferences.xml
+++ b/res/xml/camera_preferences.xml
@@ -365,13 +365,6 @@
camera:entries="@array/pref_camera_hdr_mode_entries"
camera:entryValues="@array/pref_camera_hdr_mode_entryvalues" />
<IconListPreference
- camera:key="pref_camera_hdr_need_1x_key"
- camera:defaultValue="@string/pref_camera_hdr_need_1x_default"
- camera:title="@string/pref_camera_hdr_need_1x_title"
- camera:singleIcon="@drawable/ic_settings_onex"
- camera:entries="@array/pref_camera_hdr_need_1x_entries"
- camera:entryValues="@array/pref_camera_hdr_need_1x_entryvalues" />
- <IconListPreference
camera:key="pref_camera_manual_exp_key"
camera:defaultValue="@string/pref_camera_manual_exp_default"
camera:title="@string/pref_camera_manual_exp_title"
diff --git a/src/com/android/camera/CameraSettings.java b/src/com/android/camera/CameraSettings.java
index aa0fee8..677a9c2 100644
--- a/src/com/android/camera/CameraSettings.java
+++ b/src/com/android/camera/CameraSettings.java
@@ -118,7 +118,6 @@ public class CameraSettings {
public static final String KEY_AE_BRACKET_HDR = "pref_camera_ae_bracket_hdr_key";
public static final String KEY_ADVANCED_FEATURES = "pref_camera_advanced_features_key";
public static final String KEY_HDR_MODE = "pref_camera_hdr_mode_key";
- public static final String KEY_HDR_NEED_1X = "pref_camera_hdr_need_1x_key";
public static final String KEY_DEVELOPER_MENU = "pref_developer_menu_key";
public static final String KEY_VIDEO_SNAPSHOT_SIZE = "pref_camera_videosnapsize_key";
@@ -155,7 +154,6 @@ public class CameraSettings {
private static final String KEY_QC_SUPPORTED_VIDEO_TNR_MODES = "video-tnr-mode-values";
private static final String KEY_QC_SUPPORTED_FACE_DETECTION = "face-detection-values";
private static final String KEY_SNAPCAM_SUPPORTED_HDR_MODES = "hdr-mode-values";
- private static final String KEY_SNAPCAM_SUPPORTED_HDR_NEED_1X = "hdr-need-1x-values";
public static final String KEY_SNAPCAM_SHUTTER_SPEED = "shutter-speed";
public static final String KEY_SNAPCAM_SHUTTER_SPEED_MODES = "shutter-speed-values";
public static final String KEY_QC_AE_BRACKETING = "ae-bracket-hdr";
@@ -176,7 +174,6 @@ public class CameraSettings {
public static final String KEY_QC_TNR_MODE = "tnr-mode";
public static final String KEY_QC_VIDEO_TNR_MODE = "video-tnr-mode";
public static final String KEY_SNAPCAM_HDR_MODE = "hdr-mode";
- public static final String KEY_SNAPCAM_HDR_NEED_1X = "hdr-need-1x";
public static final String KEY_VIDEO_HSR = "video-hsr";
public static final String KEY_QC_SEE_MORE_MODE = "see-more";
public static final String KEY_QC_NOISE_REDUCTION_MODE = "noise-reduction-mode";
@@ -608,14 +605,6 @@ public class CameraSettings {
return split(str);
}
- public static List<String> getSupportedHDRNeed1x(Parameters params) {
- String str = params.get(KEY_SNAPCAM_SUPPORTED_HDR_NEED_1X);
- if (str == null) {
- return null;
- }
- return split(str);
- }
-
public List<String> getSupportedAdvancedFeatures(Parameters params) {
String str = params.get(KEY_QC_SUPPORTED_AF_BRACKETING_MODES);
str += ',' + params.get(KEY_QC_SUPPORTED_CF_MODES);
@@ -789,7 +778,6 @@ public class CameraSettings {
ListPreference longShot = group.findPreference(KEY_LONGSHOT);
ListPreference auto_hdr = group.findPreference(KEY_AUTO_HDR);
ListPreference hdr_mode = group.findPreference(KEY_HDR_MODE);
- ListPreference hdr_need_1x = group.findPreference(KEY_HDR_NEED_1X);
ListPreference cds_mode = group.findPreference(KEY_CDS_MODE);
ListPreference video_cds_mode = group.findPreference(KEY_VIDEO_CDS_MODE);
ListPreference tnr_mode = group.findPreference(KEY_TNR_MODE);
@@ -811,11 +799,6 @@ public class CameraSettings {
mIso = removeLeadingISO(mIso);
}
- if (hdr_need_1x != null) {
- filterUnsupportedOptions(group,
- hdr_need_1x, getSupportedHDRNeed1x(mParameters));
- }
-
if (hdr_mode != null) {
filterUnsupportedOptions(group,
hdr_mode, getSupportedHDRModes(mParameters));
diff --git a/src/com/android/camera/PhotoMenu.java b/src/com/android/camera/PhotoMenu.java
index c0c87b7..42063f9 100644
--- a/src/com/android/camera/PhotoMenu.java
+++ b/src/com/android/camera/PhotoMenu.java
@@ -226,7 +226,6 @@ public class PhotoMenu extends MenuController
CameraSettings.KEY_DENOISE,
CameraSettings.KEY_AUTO_HDR,
CameraSettings.KEY_HDR_MODE,
- CameraSettings.KEY_HDR_NEED_1X,
CameraSettings.KEY_CDS_MODE,
CameraSettings.KEY_TNR_MODE,
CameraSettings.KEY_HISTOGRAM,
diff --git a/src/com/android/camera/PhotoModule.java b/src/com/android/camera/PhotoModule.java
index 1f9529a..c1447a9 100644
--- a/src/com/android/camera/PhotoModule.java
+++ b/src/com/android/camera/PhotoModule.java
@@ -3385,16 +3385,6 @@ public class PhotoModule extends BaseModule<PhotoUI> implements
mParameters.set(CameraSettings.KEY_SNAPCAM_HDR_MODE, hdrMode);
}
- // Set hdr need 1x
- String hdrNeed1x = mPreferences.getString(
- CameraSettings.KEY_HDR_NEED_1X,
- mActivity.getString(R.string.pref_camera_hdr_need_1x_default));
- if (CameraUtil.isSupported(hdrNeed1x,
- CameraSettings.getSupportedHDRNeed1x(mParameters))) {
- Log.v(TAG, "HDR need 1x value =" + hdrNeed1x);
- mParameters.set(CameraSettings.KEY_SNAPCAM_HDR_NEED_1X, hdrNeed1x);
- }
-
// Set Advanced features.
String advancedFeature = mPreferences.getString(
CameraSettings.KEY_ADVANCED_FEATURES,