summaryrefslogtreecommitdiffstats
path: root/src
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
commit9ea4147f6220e3a9fb6f9ae3fef46036919641b4 (patch)
tree79d90df1c743751fbf695278ace8f45eaf6fb998 /src
parent64c9c183384b9df6dafe0142f10c4f7b802d54bf (diff)
downloadandroid_packages_apps_Gallery2-9ea4147f6220e3a9fb6f9ae3fef46036919641b4.tar.gz
android_packages_apps_Gallery2-9ea4147f6220e3a9fb6f9ae3fef46036919641b4.tar.bz2
android_packages_apps_Gallery2-9ea4147f6220e3a9fb6f9ae3fef46036919641b4.zip
Update location indicator correctly
Bug: 8768592 Change-Id: I8f94b4fb62174c4c27e6dbdc68ba272b0d3ae371
Diffstat (limited to 'src')
-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) {