From 2398dff837f0744b03194a1016dc4457efac341e Mon Sep 17 00:00:00 2001 From: Michael Bestas Date: Tue, 3 Sep 2013 05:04:04 +0300 Subject: Camera: Add red-eye flash mode support Signed-off-by: Michael Bestas Change-Id: I3db982732d15fb4eb83d5e37bff1a123225d4e8e --- res/drawable-hdpi/ic_flash_redeye_holo_light.png | Bin 0 -> 2443 bytes res/drawable-hdpi/ic_indicator_flash_redeye.png | Bin 0 -> 1838 bytes res/drawable-mdpi/ic_flash_redeye_holo_light.png | Bin 0 -> 1369 bytes res/drawable-mdpi/ic_indicator_flash_redeye.png | Bin 0 -> 1041 bytes res/drawable-xhdpi/ic_flash_redeye_holo_light.png | Bin 0 -> 2982 bytes res/drawable-xhdpi/ic_indicator_flash_redeye.png | Bin 0 -> 2506 bytes res/values/arrays.xml | 5 +++++ res/values/cm_strings.xml | 3 +++ src/com/android/camera/OnScreenIndicators.java | 4 +++- 9 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 res/drawable-hdpi/ic_flash_redeye_holo_light.png create mode 100644 res/drawable-hdpi/ic_indicator_flash_redeye.png create mode 100644 res/drawable-mdpi/ic_flash_redeye_holo_light.png create mode 100644 res/drawable-mdpi/ic_indicator_flash_redeye.png create mode 100644 res/drawable-xhdpi/ic_flash_redeye_holo_light.png create mode 100644 res/drawable-xhdpi/ic_indicator_flash_redeye.png diff --git a/res/drawable-hdpi/ic_flash_redeye_holo_light.png b/res/drawable-hdpi/ic_flash_redeye_holo_light.png new file mode 100644 index 000000000..619508a85 Binary files /dev/null and b/res/drawable-hdpi/ic_flash_redeye_holo_light.png differ diff --git a/res/drawable-hdpi/ic_indicator_flash_redeye.png b/res/drawable-hdpi/ic_indicator_flash_redeye.png new file mode 100644 index 000000000..a75f66fe2 Binary files /dev/null and b/res/drawable-hdpi/ic_indicator_flash_redeye.png differ diff --git a/res/drawable-mdpi/ic_flash_redeye_holo_light.png b/res/drawable-mdpi/ic_flash_redeye_holo_light.png new file mode 100644 index 000000000..6062964c9 Binary files /dev/null and b/res/drawable-mdpi/ic_flash_redeye_holo_light.png differ diff --git a/res/drawable-mdpi/ic_indicator_flash_redeye.png b/res/drawable-mdpi/ic_indicator_flash_redeye.png new file mode 100644 index 000000000..03eac388a Binary files /dev/null and b/res/drawable-mdpi/ic_indicator_flash_redeye.png differ diff --git a/res/drawable-xhdpi/ic_flash_redeye_holo_light.png b/res/drawable-xhdpi/ic_flash_redeye_holo_light.png new file mode 100644 index 000000000..3797c174a Binary files /dev/null and b/res/drawable-xhdpi/ic_flash_redeye_holo_light.png differ diff --git a/res/drawable-xhdpi/ic_indicator_flash_redeye.png b/res/drawable-xhdpi/ic_indicator_flash_redeye.png new file mode 100644 index 000000000..ca9438441 Binary files /dev/null and b/res/drawable-xhdpi/ic_indicator_flash_redeye.png differ diff --git a/res/values/arrays.xml b/res/values/arrays.xml index b2f277eb3..bbc80361d 100644 --- a/res/values/arrays.xml +++ b/res/values/arrays.xml @@ -315,30 +315,35 @@ @string/pref_camera_flashmode_entry_off @string/pref_camera_flashmode_entry_auto @string/pref_camera_flashmode_entry_on + @string/pref_camera_flashmode_entry_redeye @string/pref_camera_flashmode_label_off @string/pref_camera_flashmode_label_auto @string/pref_camera_flashmode_label_on + @string/pref_camera_flashmode_label_redeye off auto on + red-eye @drawable/ic_flash_off_holo_light @drawable/ic_flash_auto_holo_light @drawable/ic_flash_on_holo_light + @drawable/ic_flash_redeye_holo_light @drawable/ic_flash_off_holo_light @drawable/ic_flash_auto_holo_light @drawable/ic_flash_on_holo_light + @drawable/ic_flash_redeye_holo_light diff --git a/res/values/cm_strings.xml b/res/values/cm_strings.xml index 930db48c4..126e2043d 100644 --- a/res/values/cm_strings.xml +++ b/res/values/cm_strings.xml @@ -139,4 +139,7 @@ Point red-yellow Cartoonize + + Red eye + RED EYE diff --git a/src/com/android/camera/OnScreenIndicators.java b/src/com/android/camera/OnScreenIndicators.java index 67cbad1c9..9d07c49e2 100644 --- a/src/com/android/camera/OnScreenIndicators.java +++ b/src/com/android/camera/OnScreenIndicators.java @@ -149,7 +149,7 @@ public class OnScreenIndicators { /** * Set the flash indicator to the given value. * - * @param value One of Parameters.FLASH_MODE_OFF, + * @param value One of Parameters.FLASH_MODE_OFF, Parameters.FLASH_MODE_RED_EYE, * Parameters.FLASH_MODE_AUTO, Parameters.FLASH_MODE_ON. */ public void updateFlashOnScreenIndicator(String value) { @@ -164,6 +164,8 @@ public class OnScreenIndicators { } else if (Parameters.FLASH_MODE_ON.equals(value) || Parameters.FLASH_MODE_TORCH.equals(value)) { mFlashIndicator.setImageResource(R.drawable.ic_indicator_flash_on); + } else if (Parameters.FLASH_MODE_RED_EYE.equals(value)) { + mFlashIndicator.setImageResource(R.drawable.ic_indicator_flash_redeye); } else { mFlashIndicator.setImageResource(R.drawable.ic_indicator_flash_off); } -- cgit v1.2.3