diff options
author | Camera Software Integration <camswint@localhost> | 2016-12-01 09:17:17 -0800 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2016-12-01 09:17:17 -0800 |
commit | 8733198484b8fb7f80862a8953657efba8eb7bf8 (patch) | |
tree | 79a97d178a1a5c7986ebbb7e13e83d84ffa2b9ee | |
parent | 03469d0ac6d64bc256a1674cadb218bda1308dc5 (diff) | |
parent | fe55beed76f25d83cb89104947eb36b7e6417f5a (diff) | |
download | android_packages_apps_Snap-8733198484b8fb7f80862a8953657efba8eb7bf8.tar.gz android_packages_apps_Snap-8733198484b8fb7f80862a8953657efba8eb7bf8.tar.bz2 android_packages_apps_Snap-8733198484b8fb7f80862a8953657efba8eb7bf8.zip |
Merge "SnapdragonCamera: GPS location can't be turn On in camera settings" into camera.lnx.1.0-dev.1.0
-rw-r--r-- | src/com/android/camera/PhotoModule.java | 11 | ||||
-rw-r--r-- | src/com/android/camera/PhotoUI.java | 2 | ||||
-rw-r--r-- | src/com/android/camera/RecordLocationPreference.java | 11 | ||||
-rw-r--r-- | src/com/android/camera/VideoModule.java | 6 | ||||
-rw-r--r-- | src/com/android/camera/VideoUI.java | 2 | ||||
-rw-r--r-- | src/com/android/camera/WideAnglePanoramaModule.java | 3 |
6 files changed, 20 insertions, 15 deletions
diff --git a/src/com/android/camera/PhotoModule.java b/src/com/android/camera/PhotoModule.java index cfdd8af12..884fe142e 100644 --- a/src/com/android/camera/PhotoModule.java +++ b/src/com/android/camera/PhotoModule.java @@ -629,7 +629,7 @@ public class PhotoModule private void locationFirstRun() { /* Do not prompt if the preference is already set, this is a secure * camera session, or the prompt has already been triggered. */ - if (RecordLocationPreference.isSet(mPreferences) || + if (RecordLocationPreference.isSet(mPreferences, CameraSettings.KEY_RECORD_LOCATION) || mActivity.isSecureCamera() || mLocationPromptTriggered) { return; } @@ -912,7 +912,8 @@ public class PhotoModule } // Initialize location service. - boolean recordLocation = RecordLocationPreference.get(mPreferences); + boolean recordLocation = RecordLocationPreference.get(mPreferences, + CameraSettings.KEY_RECORD_LOCATION); mLocationManager.recordLocation(recordLocation); mUI.initializeFirstTime(); @@ -943,7 +944,8 @@ public class PhotoModule // onResume. private void initializeSecondTime() { // Start location update if needed. - boolean recordLocation = RecordLocationPreference.get(mPreferences); + boolean recordLocation = RecordLocationPreference.get(mPreferences, + CameraSettings.KEY_RECORD_LOCATION); mLocationManager.recordLocation(recordLocation); MediaSaveService s = mActivity.getMediaSaveService(); if (s != null) { @@ -4673,7 +4675,8 @@ public class PhotoModule // ignore the events after "onPause()" if (mPaused) return; - boolean recordLocation = RecordLocationPreference.get(mPreferences); + boolean recordLocation = RecordLocationPreference.get(mPreferences, + CameraSettings.KEY_RECORD_LOCATION); mLocationManager.recordLocation(recordLocation); if(needRestart()){ Log.v(TAG, "Restarting Preview... Camera Mode Changed"); diff --git a/src/com/android/camera/PhotoUI.java b/src/com/android/camera/PhotoUI.java index 250bfa603..442c65d94 100644 --- a/src/com/android/camera/PhotoUI.java +++ b/src/com/android/camera/PhotoUI.java @@ -728,7 +728,7 @@ public class PhotoUI implements PieListener, // make sure the correct value was found // otherwise use auto index mOnScreenIndicators.updateWBIndicator(wbIndex < 0 ? 2 : wbIndex); - boolean location = RecordLocationPreference.get(prefs); + boolean location = RecordLocationPreference.get(prefs, CameraSettings.KEY_RECORD_LOCATION); mOnScreenIndicators.updateLocationIndicator(location); } diff --git a/src/com/android/camera/RecordLocationPreference.java b/src/com/android/camera/RecordLocationPreference.java index b88f5e4ed..088ff663f 100644 --- a/src/com/android/camera/RecordLocationPreference.java +++ b/src/com/android/camera/RecordLocationPreference.java @@ -40,18 +40,17 @@ public class RecordLocationPreference extends IconListPreference { @Override public String getValue() { - return get(getSharedPreferences()) ? VALUE_ON : VALUE_OFF; + return get(getSharedPreferences(), getKey()) ? VALUE_ON : VALUE_OFF; } - public static boolean get(SharedPreferences pref) { - String value = pref.getString( - CameraSettings.KEY_RECORD_LOCATION, VALUE_NONE); + public static boolean get(SharedPreferences pref, String key) { + String value = pref.getString(key, VALUE_NONE); return VALUE_ON.equals(value); } - public static boolean isSet(SharedPreferences pref) { + public static boolean isSet(SharedPreferences pref, String key) { String value = pref.getString( - CameraSettings.KEY_RECORD_LOCATION, VALUE_NONE); + key, VALUE_NONE); return !VALUE_NONE.equals(value); } } diff --git a/src/com/android/camera/VideoModule.java b/src/com/android/camera/VideoModule.java index 21ad36fcf..e420addcb 100644 --- a/src/com/android/camera/VideoModule.java +++ b/src/com/android/camera/VideoModule.java @@ -1158,7 +1158,8 @@ public class VideoModule implements CameraModule, mOrientationManager.resume(); // Initialize location service. - boolean recordLocation = RecordLocationPreference.get(mPreferences); + boolean recordLocation = RecordLocationPreference.get(mPreferences, + CameraSettings.KEY_RECORD_LOCATION); mLocationManager.recordLocation(recordLocation); if (mPreviewing) { @@ -2798,7 +2799,8 @@ public class VideoModule implements CameraModule, // startPreview(). if (mCameraDevice == null) return; - boolean recordLocation = RecordLocationPreference.get(mPreferences); + boolean recordLocation = RecordLocationPreference.get(mPreferences, + CameraSettings.KEY_RECORD_LOCATION); mLocationManager.recordLocation(recordLocation); readVideoPreferences(); diff --git a/src/com/android/camera/VideoUI.java b/src/com/android/camera/VideoUI.java index c68d895ea..e853783a6 100644 --- a/src/com/android/camera/VideoUI.java +++ b/src/com/android/camera/VideoUI.java @@ -721,7 +721,7 @@ public class VideoUI implements PieRenderer.PieListener, public void updateOnScreenIndicators(Parameters param, ComboPreferences prefs) { mOnScreenIndicators.updateFlashOnScreenIndicator(param.getFlashMode()); - boolean location = RecordLocationPreference.get(prefs); + boolean location = RecordLocationPreference.get(prefs, CameraSettings.KEY_RECORD_LOCATION); mOnScreenIndicators.updateLocationIndicator(location); } diff --git a/src/com/android/camera/WideAnglePanoramaModule.java b/src/com/android/camera/WideAnglePanoramaModule.java index 7a3b114d1..2d4ec1419 100644 --- a/src/com/android/camera/WideAnglePanoramaModule.java +++ b/src/com/android/camera/WideAnglePanoramaModule.java @@ -1046,7 +1046,8 @@ public class WideAnglePanoramaModule mOrientationManager.resume(); // Initialize location service. - boolean recordLocation = RecordLocationPreference.get(mPreferences); + boolean recordLocation = RecordLocationPreference.get(mPreferences, + CameraSettings.KEY_RECORD_LOCATION); mLocationManager.recordLocation(recordLocation); mUI.initDisplayChangeListener(); UsageStatistics.onContentViewChanged( |