summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/VideoCamera.java
diff options
context:
space:
mode:
authorCheng-Ru Lin <owenlin@google.com>2009-11-12 11:48:46 +0800
committerCheng-Ru Lin <owenlin@google.com>2009-11-12 14:25:54 +0800
commitcc12a303ad51063cee73715849a951fb5f383188 (patch)
treed623cf3ac9d26f79a9582164357f6e97dd911fe4 /src/com/android/camera/VideoCamera.java
parent9324f11afe9366cd5479828a214dc8de8696a5ab (diff)
downloadLegacyCamera-cc12a303ad51063cee73715849a951fb5f383188.zip
LegacyCamera-cc12a303ad51063cee73715849a951fb5f383188.tar.gz
LegacyCamera-cc12a303ad51063cee73715849a951fb5f383188.tar.bz2
Add icon-indicators to VideoCamera.
Change-Id: Ie5ace8cf1863636ffe94f89d70525483a95b3239 http://b/2247081
Diffstat (limited to 'src/com/android/camera/VideoCamera.java')
-rw-r--r--src/com/android/camera/VideoCamera.java17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/com/android/camera/VideoCamera.java b/src/com/android/camera/VideoCamera.java
index afd4cdd..f065f90 100644
--- a/src/com/android/camera/VideoCamera.java
+++ b/src/com/android/camera/VideoCamera.java
@@ -136,6 +136,7 @@ public class VideoCamera extends Activity implements View.OnClickListener,
private String mCurrentVideoFilename;
private Uri mCurrentVideoUri;
private ContentValues mCurrentVideoValues;
+ private IconIndicator mWhitebalanceIndicator;
private MediaRecorderProfile mProfile;
@@ -311,6 +312,9 @@ public class VideoCamera extends Activity implements View.OnClickListener,
mGripper = findViewById(R.id.btn_gripper);
mGripper.setOnTouchListener(new GripperTouchListener());
+ mWhitebalanceIndicator =
+ (IconIndicator) findViewById(R.id.whitebalance_icon);
+
// Make sure preview is started.
try {
startPreviewThread.join();
@@ -1400,8 +1404,9 @@ public class VideoCamera extends Activity implements View.OnClickListener,
mParameters.setPreviewFrameRate(mProfile.mVideoFps);
// Set white balance parameter.
+ String whiteBalance = Parameters.WHITE_BALANCE_AUTO;
if (mParameters.getSupportedWhiteBalance() != null) {
- String whiteBalance = mPreferences.getString(
+ whiteBalance = mPreferences.getString(
CameraSettings.KEY_WHITE_BALANCE,
getString(R.string.pref_camera_whitebalance_default));
mParameters.setWhiteBalance(whiteBalance);
@@ -1416,6 +1421,16 @@ public class VideoCamera extends Activity implements View.OnClickListener,
}
mCameraDevice.setParameters(mParameters);
+
+ final String finalWhiteBalance = whiteBalance;
+
+ // It can be execute from the startPreview thread, so we post it
+ // to the main UI thread
+ mHandler.post(new Runnable() {
+ public void run() {
+ mWhitebalanceIndicator.setMode(finalWhiteBalance);
+ }
+ });
}
public boolean onSwitchChanged(Switcher source, boolean onOff) {