summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera
diff options
context:
space:
mode:
authorAndroid (Google) Code Review <android-gerrit@google.com>2009-09-30 02:42:56 -0400
committerAndroid (Google) Code Review <android-gerrit@google.com>2009-09-30 02:42:56 -0400
commitf8285337113a85b00e72e9b03911449b3bcafac4 (patch)
tree4c923615263220ae12d1ed3c45037bf6c02d36d7 /src/com/android/camera
parent62eaf47d1963350d91ac97cb84e6ef61f3a03ecc (diff)
parent27e69927ba1a69aaa7a72eab16a278221c2db273 (diff)
downloadLegacyCamera-f8285337113a85b00e72e9b03911449b3bcafac4.zip
LegacyCamera-f8285337113a85b00e72e9b03911449b3bcafac4.tar.gz
LegacyCamera-f8285337113a85b00e72e9b03911449b3bcafac4.tar.bz2
Merge change I697e45f9 into eclair
* changes: Try some mock icons to feel the layout.
Diffstat (limited to 'src/com/android/camera')
-rw-r--r--src/com/android/camera/Camera.java33
1 files changed, 24 insertions, 9 deletions
diff --git a/src/com/android/camera/Camera.java b/src/com/android/camera/Camera.java
index b258654..c02c0ce 100644
--- a/src/com/android/camera/Camera.java
+++ b/src/com/android/camera/Camera.java
@@ -99,6 +99,9 @@ public class Camera extends Activity implements View.OnClickListener,
private static final int SCREEN_DELAY = 2 * 60 * 1000;
private static final int FOCUS_BEEP_VOLUME = 100;
+ private static final String WHITE_BALANCE_ON = "on";
+ private static final String WHITE_BALANCE_OFF = "off";
+
private double mZoomValue; // The current zoom value.
private double mZoomStep;
private double mZoomMax;
@@ -139,6 +142,8 @@ public class Camera extends Activity implements View.OnClickListener,
private FocusRectangle mFocusRectangle;
private IconIndicator mGpsIndicator;
private IconIndicator mFlashIndicator;
+ private IconIndicator mFocusIndicator;
+ private IconIndicator mWhitebalanceIndicator;
private ToneGenerator mFocusToneGenerator;
private ZoomButtonsController mZoomButtons;
private GestureDetector mGestureDetector;
@@ -920,6 +925,9 @@ public class Camera extends Activity implements View.OnClickListener,
.setOnTouchListener(new GripperTouchListener());
mFlashIndicator = (IconIndicator) findViewById(R.id.flash_icon);
+ mFocusIndicator = (IconIndicator) findViewById(R.id.focus_icon);
+ mWhitebalanceIndicator =
+ (IconIndicator) findViewById(R.id.whitebalance_icon);
// Make sure preview is started.
try {
@@ -1684,15 +1692,6 @@ public class Camera extends Activity implements View.OnClickListener,
flashMode = Parameters.FLASH_MODE_OFF;
}
- // We post the runner because this function can be called from
- // non-UI thread (i.e., startPreviewThread).
- final String finalFlashMode = flashMode;
- mHandler.post(new Runnable() {
- public void run() {
- mFlashIndicator.setMode(finalFlashMode);
- }
- });
-
// Set white balance parameter.
String whiteBalance = mPreferences.getString(
CameraSettings.KEY_WHITE_BALANCE,
@@ -1725,6 +1724,22 @@ public class Camera extends Activity implements View.OnClickListener,
mParameters.setFocusMode(mFocusMode);
}
+ // We post the runner because this function can be called from
+ // non-UI thread (i.e., startPreviewThread).
+ final String finalWhiteBalance =
+ Parameters.WHITE_BALANCE_AUTO.equals(whiteBalance)
+ ? WHITE_BALANCE_OFF
+ : WHITE_BALANCE_ON;
+ final String finalFlashMode = flashMode;
+
+ mHandler.post(new Runnable() {
+ public void run() {
+ mFocusIndicator.setMode(mFocusMode);
+ mWhitebalanceIndicator.setMode(finalWhiteBalance);
+ mFlashIndicator.setMode(finalFlashMode);
+ }
+ });
+
mCameraDevice.setParameters(mParameters);
}