summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorMichael Kolb <kolby@google.com>2013-04-30 15:38:49 -0700
committerMichael Kolb <kolby@google.com>2013-04-30 15:52:37 -0700
commit8788079a51a90255dce330e56afcb6674deccbf7 (patch)
treeeaa4560185c02cd803072c4e2a66dff8209ebe32 /src/com
parent997dfc3211ac036448d18d0c0076fef9623885c0 (diff)
downloadandroid_packages_apps_Snap-8788079a51a90255dce330e56afcb6674deccbf7.tar.gz
android_packages_apps_Snap-8788079a51a90255dce330e56afcb6674deccbf7.tar.bz2
android_packages_apps_Snap-8788079a51a90255dce330e56afcb6674deccbf7.zip
Update location indicator correctly
Bug: 8768592 Change-Id: I8f94b4fb62174c4c27e6dbdc68ba272b0d3ae371
Diffstat (limited to 'src/com')
-rw-r--r--src/com/android/camera/PhotoUI.java9
-rw-r--r--src/com/android/camera/VideoModule.java6
-rw-r--r--src/com/android/camera/VideoUI.java6
3 files changed, 10 insertions, 11 deletions
diff --git a/src/com/android/camera/PhotoUI.java b/src/com/android/camera/PhotoUI.java
index e2b78197f..094910496 100644
--- a/src/com/android/camera/PhotoUI.java
+++ b/src/com/android/camera/PhotoUI.java
@@ -306,16 +306,11 @@ public class PhotoUI implements PieListener,
wbIndex = pref.getCurrentIndex();
}
mOnScreenIndicators.updateWBIndicator(wbIndex);
- boolean location = false;
- pref = group.findPreference(CameraSettings.KEY_RECORD_LOCATION);
- if (pref != null) {
- location = !(pref.getCurrentIndex() == 0);
- }
+ boolean location = RecordLocationPreference.get(
+ prefs, mActivity.getContentResolver());
mOnScreenIndicators.updateLocationIndicator(location);
}
-
-
public void setCameraState(int state) {
}
diff --git a/src/com/android/camera/VideoModule.java b/src/com/android/camera/VideoModule.java
index 54d9f3633..0bcdbabb5 100644
--- a/src/com/android/camera/VideoModule.java
+++ b/src/com/android/camera/VideoModule.java
@@ -417,7 +417,7 @@ public class VideoModule implements CameraModule,
initializeVideoControl();
mPendingSwitchCameraId = -1;
- mUI.updateOnScreenIndicators(mParameters);
+ mUI.updateOnScreenIndicators(mParameters, mPreferences);
// Disable the shutter button if effects are ON since it might take
// a little more time for the effects preview to be ready. We do not
@@ -2008,7 +2008,7 @@ public class VideoModule implements CameraModule,
} else {
setCameraParameters();
}
- mUI.updateOnScreenIndicators(mParameters);
+ mUI.updateOnScreenIndicators(mParameters, mPreferences);
}
}
@@ -2046,7 +2046,7 @@ public class VideoModule implements CameraModule,
// onFrameAvailable from the old camera may already exist.
mHandler.sendEmptyMessage(SWITCH_CAMERA_START_ANIMATION);
}
- mUI.updateOnScreenIndicators(mParameters);
+ mUI.updateOnScreenIndicators(mParameters, mPreferences);
}
// Preview texture has been copied. Now camera can be released and the
diff --git a/src/com/android/camera/VideoUI.java b/src/com/android/camera/VideoUI.java
index e55de9e6d..0afcd8a8d 100644
--- a/src/com/android/camera/VideoUI.java
+++ b/src/com/android/camera/VideoUI.java
@@ -251,8 +251,12 @@ public class VideoUI implements SurfaceHolder.Callback, PieRenderer.PieListener,
mLabelsLinearLayout = (LinearLayout) mRootView.findViewById(R.id.labels);
}
- public void updateOnScreenIndicators(Parameters param) {
+ public void updateOnScreenIndicators(Parameters param, ComboPreferences prefs) {
mOnScreenIndicators.updateFlashOnScreenIndicator(param.getFlashMode());
+ boolean location = RecordLocationPreference.get(
+ prefs, mActivity.getContentResolver());
+ mOnScreenIndicators.updateLocationIndicator(location);
+
}
public void setAspectRatio(double ratio) {