OSDN Git Service

Rename HDR+ torch to flash
authorSam Hasinoff <hasinoff@google.com>
Wed, 21 May 2014 20:27:45 +0000 (13:27 -0700)
committerSam Hasinoff <hasinoff@google.com>
Wed, 21 May 2014 20:33:25 +0000 (13:33 -0700)
For consistency, and to better reflect the meaning of the
flash button in HDR+ mode, change the naming from 'torch'
to 'flash'.

Even though flash in HDR+ mode is implemented by turning
the flash on in torch mode for a burst of frames, HDR+ flash
is closer in meaning to a regular photographic flash than
a flashlight/torch.

Bug: 15133661

Change-Id: I3ac4bb3dac455be1341575966910c2a86e29644b

res/values/strings.xml
src/com/android/camera/ButtonManager.java
src/com/android/camera/app/CameraAppUI.java

index b3068d8..e0b607f 100644 (file)
@@ -743,9 +743,9 @@ CHAR LIMIT=NONE] -->
     <string name="flash_on_desc">Flash on</string>
 
     <!-- Accessibility text for HDR+ flash toggle button states [CHAR_LIMIT=NONE] -->
-    <string name="hdr_plus_flash_off_desc">HDR+ torch off</string>
-    <string name="hdr_plus_flash_auto_desc">HDR+ torch auto</string>
-    <string name="hdr_plus_flash_on_desc">HDR+ torch on</string>
+    <string name="hdr_plus_flash_off_desc">HDR+ flash off</string>
+    <string name="hdr_plus_flash_auto_desc">HDR+ flash auto</string>
+    <string name="hdr_plus_flash_on_desc">HDR+ flash on</string>
 
     <!-- Accessibility text for vide torch (flash) toggle button states [CHAR_LIMIT=NONE] -->
     <string name="torch_on_desc">Torch on</string>
index c0923ef..be764c7 100644 (file)
@@ -44,7 +44,7 @@ public class ButtonManager implements SettingsManager.OnSettingChangedListener {
 
     public static final int BUTTON_FLASH = 0;
     public static final int BUTTON_TORCH = 1;
-    public static final int BUTTON_HDR_PLUS_TORCH = 2;
+    public static final int BUTTON_HDR_PLUS_FLASH = 2;
     public static final int BUTTON_CAMERA = 3;
     public static final int BUTTON_HDR_PLUS = 4;
     public static final int BUTTON_HDR = 5;
@@ -197,7 +197,7 @@ public class ButtonManager implements SettingsManager.OnSettingChangedListener {
             }
             case SettingsManager.SETTING_HDR_PLUS_FLASH_MODE: {
                 index = mSettingsManager.getStringValueIndex(id);
-                button = getButtonOrError(BUTTON_HDR_PLUS_TORCH);
+                button = getButtonOrError(BUTTON_HDR_PLUS_FLASH);
                 break;
             }
             case SettingsManager.SETTING_CAMERA_ID: {
@@ -272,7 +272,7 @@ public class ButtonManager implements SettingsManager.OnSettingChangedListener {
                     throw new IllegalStateException("Torch button could not be found.");
                 }
                 return mButtonFlash;
-            case BUTTON_HDR_PLUS_TORCH:
+            case BUTTON_HDR_PLUS_FLASH:
                 if (mButtonFlash == null) {
                     throw new IllegalStateException("Hdr plus torch button could not be found.");
                 }
@@ -358,8 +358,8 @@ public class ButtonManager implements SettingsManager.OnSettingChangedListener {
             case BUTTON_TORCH:
                 initializeTorchButton(button, cb, R.array.video_flashmode_icons);
                 break;
-            case BUTTON_HDR_PLUS_TORCH:
-                initializeHdrPlusTorchButton(button, cb, R.array.camera_flashmode_icons);
+            case BUTTON_HDR_PLUS_FLASH:
+                initializeHdrPlusFlashButton(button, cb, R.array.camera_flashmode_icons);
                 break;
             case BUTTON_CAMERA:
                 initializeCameraButton(button, cb, R.array.camera_id_icons);
@@ -639,9 +639,9 @@ public class ButtonManager implements SettingsManager.OnSettingChangedListener {
     }
 
     /**
-     * Initialize hdr plus torch button
+     * Initialize hdr plus flash button
      */
-    private void initializeHdrPlusTorchButton(MultiToggleImageButton button,
+    private void initializeHdrPlusFlashButton(MultiToggleImageButton button,
             final ButtonCallback cb, int resIdImages) {
 
         if (resIdImages > 0) {
index 886af04..346a3df 100644 (file)
@@ -610,7 +610,7 @@ public class CameraAppUI implements ModeListView.ModeSwitchListener,
     /**
      * Updates the preview matrix without altering it. Assumes a fullscreen
      * aspect ratio.
-     * 
+     *
      * @param matrix
      */
     public void updatePreviewTransformFullscreen(Matrix matrix) {
@@ -1733,7 +1733,7 @@ public class CameraAppUI implements ModeListView.ModeSwitchListener,
                     buttonManager.initializeButton(ButtonManager.BUTTON_TORCH,
                         bottomBarSpec.flashCallback);
                 } else if (bottomBarSpec.enableHdrPlusFlash) {
-                    buttonManager.initializeButton(ButtonManager.BUTTON_HDR_PLUS_TORCH,
+                    buttonManager.initializeButton(ButtonManager.BUTTON_HDR_PLUS_FLASH,
                         bottomBarSpec.flashCallback);
                 } else {
                     buttonManager.disableButton(ButtonManager.BUTTON_FLASH);