diff options
author | Sascha Haeberling <haeberling@google.com> | 2013-10-03 20:47:44 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-10-03 20:47:44 +0000 |
commit | 238799e97077ee72a53a5a04d9d3068aebb82bf7 (patch) | |
tree | 9a7ceb2e6f13a16014531ef3587e15611bf0722a | |
parent | 5bca6f4cf43732edf459010f418d3719e07f3c8a (diff) | |
parent | 9bf0fd606a624138b8c1123d168f06a24c4d20a3 (diff) | |
download | android_packages_apps_Snap-238799e97077ee72a53a5a04d9d3068aebb82bf7.tar.gz android_packages_apps_Snap-238799e97077ee72a53a5a04d9d3068aebb82bf7.tar.bz2 android_packages_apps_Snap-238799e97077ee72a53a5a04d9d3068aebb82bf7.zip |
Merge "Change icons and code from HQ to HDR+ mode." into gb-ub-photos-carlsbad
33 files changed, 45 insertions, 50 deletions
diff --git a/res/drawable-hdpi/ic_hdr_plus_disabled.png b/res/drawable-hdpi/ic_hdr_plus_disabled.png Binary files differnew file mode 100644 index 000000000..68976c242 --- /dev/null +++ b/res/drawable-hdpi/ic_hdr_plus_disabled.png diff --git a/res/drawable-hdpi/ic_hdr_plus_disabled_pressed.png b/res/drawable-hdpi/ic_hdr_plus_disabled_pressed.png Binary files differnew file mode 100644 index 000000000..ed8d78ed2 --- /dev/null +++ b/res/drawable-hdpi/ic_hdr_plus_disabled_pressed.png diff --git a/res/drawable-hdpi/ic_hdr_plus_normal.png b/res/drawable-hdpi/ic_hdr_plus_normal.png Binary files differnew file mode 100644 index 000000000..384b33782 --- /dev/null +++ b/res/drawable-hdpi/ic_hdr_plus_normal.png diff --git a/res/drawable-hdpi/ic_hdr_plus_normal_pressed.png b/res/drawable-hdpi/ic_hdr_plus_normal_pressed.png Binary files differnew file mode 100644 index 000000000..2f5d238dd --- /dev/null +++ b/res/drawable-hdpi/ic_hdr_plus_normal_pressed.png diff --git a/res/drawable-hdpi/ic_indicator_hdr_plus_on.png b/res/drawable-hdpi/ic_indicator_hdr_plus_on.png Binary files differnew file mode 100644 index 000000000..a7d7db8bb --- /dev/null +++ b/res/drawable-hdpi/ic_indicator_hdr_plus_on.png diff --git a/res/drawable-mdpi/ic_hdr_plus_disabled.png b/res/drawable-mdpi/ic_hdr_plus_disabled.png Binary files differnew file mode 100644 index 000000000..6781d647c --- /dev/null +++ b/res/drawable-mdpi/ic_hdr_plus_disabled.png diff --git a/res/drawable-mdpi/ic_hdr_plus_disabled_pressed.png b/res/drawable-mdpi/ic_hdr_plus_disabled_pressed.png Binary files differnew file mode 100644 index 000000000..287fdd287 --- /dev/null +++ b/res/drawable-mdpi/ic_hdr_plus_disabled_pressed.png diff --git a/res/drawable-mdpi/ic_hdr_plus_normal.png b/res/drawable-mdpi/ic_hdr_plus_normal.png Binary files differnew file mode 100644 index 000000000..7c280e525 --- /dev/null +++ b/res/drawable-mdpi/ic_hdr_plus_normal.png diff --git a/res/drawable-mdpi/ic_hdr_plus_normal_pressed.png b/res/drawable-mdpi/ic_hdr_plus_normal_pressed.png Binary files differnew file mode 100644 index 000000000..be498e492 --- /dev/null +++ b/res/drawable-mdpi/ic_hdr_plus_normal_pressed.png diff --git a/res/drawable-mdpi/ic_indicator_hdr_plus_on.png b/res/drawable-mdpi/ic_indicator_hdr_plus_on.png Binary files differnew file mode 100644 index 000000000..1cf56b3f3 --- /dev/null +++ b/res/drawable-mdpi/ic_indicator_hdr_plus_on.png diff --git a/res/drawable-xhdpi/ic_hdr_plus_disabled.png b/res/drawable-xhdpi/ic_hdr_plus_disabled.png Binary files differnew file mode 100644 index 000000000..ff7d89c8b --- /dev/null +++ b/res/drawable-xhdpi/ic_hdr_plus_disabled.png diff --git a/res/drawable-xhdpi/ic_hdr_plus_disabled_pressed.png b/res/drawable-xhdpi/ic_hdr_plus_disabled_pressed.png Binary files differnew file mode 100644 index 000000000..69676c62c --- /dev/null +++ b/res/drawable-xhdpi/ic_hdr_plus_disabled_pressed.png diff --git a/res/drawable-xhdpi/ic_hdr_plus_normal.png b/res/drawable-xhdpi/ic_hdr_plus_normal.png Binary files differnew file mode 100644 index 000000000..1358e3412 --- /dev/null +++ b/res/drawable-xhdpi/ic_hdr_plus_normal.png diff --git a/res/drawable-xhdpi/ic_hdr_plus_normal_pressed.png b/res/drawable-xhdpi/ic_hdr_plus_normal_pressed.png Binary files differnew file mode 100644 index 000000000..d1135de7d --- /dev/null +++ b/res/drawable-xhdpi/ic_hdr_plus_normal_pressed.png diff --git a/res/drawable-xhdpi/ic_indicator_hdr_plus_on.png b/res/drawable-xhdpi/ic_indicator_hdr_plus_on.png Binary files differnew file mode 100644 index 000000000..f6ce3d7a5 --- /dev/null +++ b/res/drawable-xhdpi/ic_indicator_hdr_plus_on.png diff --git a/res/drawable-xxhdpi/ic_hdr_plus_disabled.png b/res/drawable-xxhdpi/ic_hdr_plus_disabled.png Binary files differnew file mode 100644 index 000000000..7fa8e9c79 --- /dev/null +++ b/res/drawable-xxhdpi/ic_hdr_plus_disabled.png diff --git a/res/drawable-xxhdpi/ic_hdr_plus_disabled_pressed.png b/res/drawable-xxhdpi/ic_hdr_plus_disabled_pressed.png Binary files differnew file mode 100644 index 000000000..ed7295416 --- /dev/null +++ b/res/drawable-xxhdpi/ic_hdr_plus_disabled_pressed.png diff --git a/res/drawable-xxhdpi/ic_hdr_plus_normal.png b/res/drawable-xxhdpi/ic_hdr_plus_normal.png Binary files differnew file mode 100644 index 000000000..7d2e0ef13 --- /dev/null +++ b/res/drawable-xxhdpi/ic_hdr_plus_normal.png diff --git a/res/drawable-xxhdpi/ic_hdr_plus_normal_pressed.png b/res/drawable-xxhdpi/ic_hdr_plus_normal_pressed.png Binary files differnew file mode 100644 index 000000000..558cbe876 --- /dev/null +++ b/res/drawable-xxhdpi/ic_hdr_plus_normal_pressed.png diff --git a/res/drawable-xxhdpi/ic_hq_disabled.png b/res/drawable-xxhdpi/ic_hq_disabled.png Binary files differdeleted file mode 100644 index 74d73afff..000000000 --- a/res/drawable-xxhdpi/ic_hq_disabled.png +++ /dev/null diff --git a/res/drawable-xxhdpi/ic_hq_disabled_pressed.png b/res/drawable-xxhdpi/ic_hq_disabled_pressed.png Binary files differdeleted file mode 100644 index fc84bd745..000000000 --- a/res/drawable-xxhdpi/ic_hq_disabled_pressed.png +++ /dev/null diff --git a/res/drawable-xxhdpi/ic_hq_normal.png b/res/drawable-xxhdpi/ic_hq_normal.png Binary files differdeleted file mode 100644 index 1b601ee39..000000000 --- a/res/drawable-xxhdpi/ic_hq_normal.png +++ /dev/null diff --git a/res/drawable-xxhdpi/ic_hq_normal_pressed.png b/res/drawable-xxhdpi/ic_hq_normal_pressed.png Binary files differdeleted file mode 100644 index e6e83343d..000000000 --- a/res/drawable-xxhdpi/ic_hq_normal_pressed.png +++ /dev/null diff --git a/res/drawable-xxhdpi/ic_indicator_hdr_plus_on.png b/res/drawable-xxhdpi/ic_indicator_hdr_plus_on.png Binary files differnew file mode 100644 index 000000000..3b567a0ad --- /dev/null +++ b/res/drawable-xxhdpi/ic_indicator_hdr_plus_on.png diff --git a/res/drawable-xxhdpi/ic_indicator_hq_on.png b/res/drawable-xxhdpi/ic_indicator_hq_on.png Binary files differdeleted file mode 100644 index 71d4096c9..000000000 --- a/res/drawable-xxhdpi/ic_indicator_hq_on.png +++ /dev/null diff --git a/res/values/arrays.xml b/res/values/arrays.xml index 02f873b27..56d70a3eb 100644 --- a/res/values/arrays.xml +++ b/res/values/arrays.xml @@ -430,22 +430,22 @@ <item>@drawable/ic_video_effects_background_normal_holo_dark</item> </array> - <string-array name="pref_camera_hq_entries" translatable="false"> + <string-array name="pref_camera_hdr_plus_entries" translatable="false"> <item>@string/setting_off</item> <item>@string/setting_on</item> </string-array> - <string-array name="pref_camera_hq_labels" translatable="false"> + <string-array name="pref_camera_hdr_plus_labels" translatable="false"> <item>@string/pref_camera_scenemode_entry_hdr_plus</item> <item>@string/pref_camera_scenemode_entry_hdr_plus</item> </string-array> - <string-array name="pref_camera_hq_icons" translatable="false"> - <item>@drawable/ic_hq_disabled</item> - <item>@drawable/ic_hq_normal</item> + <string-array name="pref_camera_hdr_plus_icons" translatable="false"> + <item>@drawable/ic_hdr_plus_disabled</item> + <item>@drawable/ic_hdr_plus_normal</item> </string-array> - <string-array name="pref_camera_hq_entryvalues" translatable="false"> + <string-array name="pref_camera_hdr_plus_entryvalues" translatable="false"> <item>@string/setting_off_value</item> <item>@string/setting_on_value</item> </string-array> diff --git a/res/values/strings.xml b/res/values/strings.xml index ee632fcb6..880da21c8 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -397,8 +397,8 @@ <!-- Default HDR entry value --> <string name="pref_camera_hdr_default">@string/setting_off_value</string> - <!-- Default HQ entry value --> - <string name="pref_camera_hq_default">@string/setting_off_value</string> + <!-- Default HDR+ entry value --> + <string name="pref_camera_hdr_plus_default">@string/setting_off_value</string> <!-- HDR label ON [CHAR LIMIT=60] --> <string name="pref_camera_hdr_label">HDR</string> diff --git a/res/xml/camera_preferences.xml b/res/xml/camera_preferences.xml index b15a4ccf6..975a15dea 100644 --- a/res/xml/camera_preferences.xml +++ b/res/xml/camera_preferences.xml @@ -89,14 +89,14 @@ camera:labelList="@array/pref_camera_hdr_labels" camera:entryValues="@array/pref_camera_hdr_entryvalues" /> <IconListPreference - camera:key="pref_camera_hq_key" - camera:defaultValue="@string/pref_camera_hq_default" + camera:key="pref_camera_hdr_plus_key" + camera:defaultValue="@string/pref_camera_hdr_plus_default" camera:title="@string/pref_camera_scenemode_entry_hdr_plus" - camera:entries="@array/pref_camera_hq_entries" - camera:icons="@array/pref_camera_hq_icons" - camera:largeIcons="@array/pref_camera_hq_icons" - camera:labelList="@array/pref_camera_hq_labels" - camera:entryValues="@array/pref_camera_hq_entryvalues" /> + camera:entries="@array/pref_camera_hdr_plus_entries" + camera:icons="@array/pref_camera_hdr_plus_icons" + camera:largeIcons="@array/pref_camera_hdr_plus_icons" + camera:labelList="@array/pref_camera_hdr_plus_labels" + camera:entryValues="@array/pref_camera_hdr_plus_entryvalues" /> <CountDownTimerPreference camera:key="pref_camera_timer_key" camera:defaultValue="@string/pref_camera_timer_default" diff --git a/src/com/android/camera/CameraSettings.java b/src/com/android/camera/CameraSettings.java index fea544dec..3eb0a3256 100644 --- a/src/com/android/camera/CameraSettings.java +++ b/src/com/android/camera/CameraSettings.java @@ -61,7 +61,7 @@ public class CameraSettings { public static final String KEY_VIDEO_EFFECT = "pref_video_effect_key"; public static final String KEY_CAMERA_ID = "pref_camera_id_key"; public static final String KEY_CAMERA_HDR = "pref_camera_hdr_key"; - public static final String KEY_CAMERA_HQ = "pref_camera_hq_key"; + public static final String KEY_CAMERA_HDR_PLUS = "pref_camera_hdr_plus_key"; public static final String KEY_CAMERA_FIRST_USE_HINT_SHOWN = "pref_camera_first_use_hint_shown_key"; public static final String KEY_VIDEO_FIRST_USE_HINT_SHOWN = "pref_video_first_use_hint_shown_key"; public static final String KEY_PHOTOSPHERE_PICTURESIZE = "pref_photosphere_picturesize_key"; @@ -171,7 +171,7 @@ public class CameraSettings { group.findPreference(KEY_VIDEOCAMERA_FLASH_MODE); ListPreference videoEffect = group.findPreference(KEY_VIDEO_EFFECT); ListPreference cameraHdr = group.findPreference(KEY_CAMERA_HDR); - ListPreference cameraHq = group.findPreference(KEY_CAMERA_HQ); + ListPreference cameraHdrPlus = group.findPreference(KEY_CAMERA_HDR_PLUS); // Since the screen could be loaded from different resources, we need // to check if the preference is available here @@ -222,9 +222,9 @@ public class CameraSettings { || !CameraUtil.isCameraHdrSupported(mParameters))) { removePreference(group, cameraHdr.getKey()); } - if (cameraHq != null && (!ApiHelper.HAS_CAMERA_HQ + if (cameraHdrPlus != null && (!ApiHelper.HAS_CAMERA_HDR_PLUS || !GcamHelper.hasGcamAsHDRMode())) { - removePreference(group, cameraHq.getKey()); + removePreference(group, cameraHdrPlus.getKey()); } } diff --git a/src/com/android/camera/OnScreenIndicators.java b/src/com/android/camera/OnScreenIndicators.java index ff0cecbd8..64992cfae 100644 --- a/src/com/android/camera/OnScreenIndicators.java +++ b/src/com/android/camera/OnScreenIndicators.java @@ -31,7 +31,7 @@ import com.android.camera2.R; * settings in the viewfinder. */ public class OnScreenIndicators { - public static final String SCENE_MODE_HQ = "hq"; + public static final String SCENE_MODE_HDR_PLUS = "hdr_plus"; private final int[] mWBArray; private final View mOnScreenIndicators; @@ -168,15 +168,15 @@ public class OnScreenIndicators { * Set the scene indicator depending on the given scene mode. * * @param value the current Parameters.SCENE_MODE_* value or - * {@link #SCENE_MODE_HQ}. + * {@link #SCENE_MODE_HDR_PLUS}. */ public void updateSceneOnScreenIndicator(String value) { if (mSceneIndicator == null) { return; } - if (SCENE_MODE_HQ.equals(value)) { - mSceneIndicator.setImageResource(R.drawable.ic_indicator_hq_on); + if (SCENE_MODE_HDR_PLUS.equals(value)) { + mSceneIndicator.setImageResource(R.drawable.ic_indicator_hdr_plus_on); } else if ((value == null) || Parameters.SCENE_MODE_AUTO.equals(value)) { mSceneIndicator.setImageResource(R.drawable.ic_indicator_sce_off); } else if (Parameters.SCENE_MODE_HDR.equals(value)) { diff --git a/src/com/android/camera/PhotoMenu.java b/src/com/android/camera/PhotoMenu.java index 77e8de417..08ce3374e 100644 --- a/src/com/android/camera/PhotoMenu.java +++ b/src/com/android/camera/PhotoMenu.java @@ -32,7 +32,7 @@ import com.android.camera2.R; public class PhotoMenu extends PieController implements CountdownTimerPopup.Listener, ListPrefSettingPopup.Listener { - private static String TAG = "CAM_photomenu"; + private static String TAG = "PhotoMenu"; private final String mSettingOff; @@ -53,36 +53,37 @@ public class PhotoMenu extends PieController PieItem item = null; final Resources res = mActivity.getResources(); Locale locale = res.getConfiguration().locale; - // the order is from left to right in the menu + // The order is from left to right in the menu. - // hq (GCam) - if (group.findPreference(CameraSettings.KEY_CAMERA_HQ) != null) { - item = makeSwitchItem(CameraSettings.KEY_CAMERA_HQ, true); + // HDR+ (GCam). + if (group.findPreference(CameraSettings.KEY_CAMERA_HDR_PLUS) != null) { + item = makeSwitchItem(CameraSettings.KEY_CAMERA_HDR_PLUS, true); mRenderer.addItem(item); } - // hdr + // HDR. if (group.findPreference(CameraSettings.KEY_CAMERA_HDR) != null) { item = makeSwitchItem(CameraSettings.KEY_CAMERA_HDR, true); mRenderer.addItem(item); } - // exposure compensation + // Exposure compensation. if (group.findPreference(CameraSettings.KEY_EXPOSURE) != null) { item = makeItem(CameraSettings.KEY_EXPOSURE); item.setLabel(res.getString(R.string.pref_exposure_label)); mRenderer.addItem(item); } - // more settings + // More settings. PieItem more = makeItem(R.drawable.ic_settings_holo_light); more.setLabel(res.getString(R.string.camera_menu_more_label)); mRenderer.addItem(more); - // flash + + // Flash. if (group.findPreference(CameraSettings.KEY_FLASH_MODE) != null) { item = makeItem(CameraSettings.KEY_FLASH_MODE); item.setLabel(res.getString(R.string.pref_camera_flashmode_label)); mRenderer.addItem(item); } - // camera switcher + // Camera switcher. if (group.findPreference(CameraSettings.KEY_CAMERA_ID) != null) { item = makeSwitchItem(CameraSettings.KEY_CAMERA_ID, false); final PieItem fitem = item; @@ -104,7 +105,7 @@ public class PhotoMenu extends PieController }); mRenderer.addItem(item); } - // location + // Location. if (group.findPreference(CameraSettings.KEY_RECORD_LOCATION) != null) { item = makeSwitchItem(CameraSettings.KEY_RECORD_LOCATION, true); more.addItem(item); @@ -113,7 +114,7 @@ public class PhotoMenu extends PieController item.setEnabled(false); } } - // countdown timer + // Countdown timer. final ListPreference ctpref = group.findPreference(CameraSettings.KEY_TIMER); final ListPreference beeppref = group.findPreference(CameraSettings.KEY_TIMER_SOUND_EFFECTS); item = makeItem(R.drawable.ic_timer); @@ -131,7 +132,7 @@ public class PhotoMenu extends PieController } }); more.addItem(item); - // image size + // Image size. item = makeItem(R.drawable.ic_imagesize); final ListPreference sizePref = group.findPreference(CameraSettings.KEY_PICTURE_SIZE); item.setLabel(res.getString(R.string.pref_camera_picturesize_title).toUpperCase(locale)); @@ -148,13 +149,13 @@ public class PhotoMenu extends PieController } }); more.addItem(item); - // white balance + // White balance. if (group.findPreference(CameraSettings.KEY_WHITE_BALANCE) != null) { item = makeItem(CameraSettings.KEY_WHITE_BALANCE); item.setLabel(res.getString(R.string.pref_camera_whitebalance_label)); more.addItem(item); } - // scene mode + // Scene mode. if (group.findPreference(CameraSettings.KEY_SCENE_MODE) != null) { IconListPreference pref = (IconListPreference) group.findPreference( CameraSettings.KEY_SCENE_MODE); diff --git a/src/com/android/camera/PhotoModule.java b/src/com/android/camera/PhotoModule.java index 3f6cd1a89..c0693deea 100644 --- a/src/com/android/camera/PhotoModule.java +++ b/src/com/android/camera/PhotoModule.java @@ -429,12 +429,6 @@ public class PhotoModule stopPreview(); } - private void setGcamPreference(String value) { - mPreferences.edit() - .putString(CameraSettings.KEY_CAMERA_HQ, value) - .apply(); - } - private void setLocationPreference(String value) { mPreferences.edit() .putString(CameraSettings.KEY_RECORD_LOCATION, value) @@ -1623,13 +1617,13 @@ public class PhotoModule String onValue = mActivity.getString(R.string.setting_on_value); String hdr = mPreferences.getString(CameraSettings.KEY_CAMERA_HDR, mActivity.getString(R.string.pref_camera_hdr_default)); - String hq = mPreferences.getString(CameraSettings.KEY_CAMERA_HQ, - mActivity.getString(R.string.pref_camera_hq_default)); + String hdrPlus = mPreferences.getString(CameraSettings.KEY_CAMERA_HDR_PLUS, + mActivity.getString(R.string.pref_camera_hdr_plus_default)); boolean hdrOn = onValue.equals(hdr); - boolean hqOn = onValue.equals(hq); + boolean hdrPlusOn = onValue.equals(hdrPlus); boolean doGcamModeSwitch = false; - if (hqOn && GcamHelper.hasGcamCapture()) { + if (hdrPlusOn && GcamHelper.hasGcamCapture()) { // Kick off mode switch to gcam. doGcamModeSwitch = true; } else { @@ -1750,7 +1744,7 @@ public class PhotoModule mCameraDevice.setParameters(mParameters); - // Switch to gcam module if HQ was selected + // Switch to gcam module if HDR+ was selected if (doModeSwitch) { mActivity.onModuleSelected(ModuleSwitcher.GCAM_MODULE_INDEX); } diff --git a/src/com/android/camera/util/ApiHelper.java b/src/com/android/camera/util/ApiHelper.java index 46cfd6183..dd5208cc8 100644 --- a/src/com/android/camera/util/ApiHelper.java +++ b/src/com/android/camera/util/ApiHelper.java @@ -39,7 +39,7 @@ public class ApiHelper { public static final boolean HAS_SURFACE_TEXTURE_RECORDING = Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN; - public static final boolean HAS_CAMERA_HQ = isKitKatOrHigher(); + public static final boolean HAS_CAMERA_HDR_PLUS = isKitKatOrHigher(); public static final boolean HAS_CAMERA_HDR = Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1; public static final boolean HAS_DISPLAY_LISTENER = |