diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2016-07-25 21:06:11 -0700 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2016-07-25 21:06:11 -0700 |
commit | 9f65ee95c61d70d6f7c34cd8bedea61ff1cdf2d1 (patch) | |
tree | 56bb55da9d21fbbeea5a506cdc88e37645326de3 /src/com/android/camera/CaptureModule.java | |
parent | 700f374f96450c57c51a009ea4de7cf8c35f1d7e (diff) | |
parent | 56aabdf703779b97ef40cbef8fcde2620a379028 (diff) | |
download | android_packages_apps_Snap-9f65ee95c61d70d6f7c34cd8bedea61ff1cdf2d1.tar.gz android_packages_apps_Snap-9f65ee95c61d70d6f7c34cd8bedea61ff1cdf2d1.tar.bz2 android_packages_apps_Snap-9f65ee95c61d70d6f7c34cd8bedea61ff1cdf2d1.zip |
Merge "SnapdragonCamera: Remove custom location permission request window" into camera.lnx.1.0-dev.1.0
Diffstat (limited to 'src/com/android/camera/CaptureModule.java')
-rw-r--r-- | src/com/android/camera/CaptureModule.java | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/src/com/android/camera/CaptureModule.java b/src/com/android/camera/CaptureModule.java index c541dd4d0..bf63de271 100644 --- a/src/com/android/camera/CaptureModule.java +++ b/src/com/android/camera/CaptureModule.java @@ -104,7 +104,8 @@ import java.util.concurrent.TimeUnit; public class CaptureModule implements CameraModule, PhotoController, MediaSaveService.Listener, ClearSightImageProcessor.Callback, - SettingsManager.Listener, CountDownView.OnCountDownFinishedListener { + SettingsManager.Listener, LocationManager.Listener, + CountDownView.OnCountDownFinishedListener { public static final int DUAL_MODE = 0; public static final int BAYER_MODE = 1; public static final int MONO_MODE = 2; @@ -855,7 +856,7 @@ public class CaptureModule implements CameraModule, PhotoController, mUI.initializeControlByIntent(); mFocusStateListener = new FocusStateListener(mUI); - mLocationManager = new LocationManager(mActivity, mUI); + mLocationManager = new LocationManager(mActivity, this); Storage.setSaveSDCard(mSettingsManager.getValue(SettingsManager .KEY_CAMERA_SAVEPATH).equals("1")); } @@ -1884,8 +1885,16 @@ public class CaptureModule implements CameraModule, PhotoController, } @Override - public void enableRecordingLocation(boolean enable) { + public void waitingLocationPermissionResult(boolean result) { + mLocationManager.waitingLocationPermissionResult(result); + } + @Override + public void enableRecordingLocation(boolean enable) { + String value = (enable ? RecordLocationPreference.VALUE_ON + : RecordLocationPreference.VALUE_OFF); + mSettingsManager.setValue(SettingsManager.KEY_RECORD_LOCATION, value); + mLocationManager.recordLocation(enable); } @Override @@ -3135,4 +3144,9 @@ public class CaptureModule implements CameraModule, PhotoController, } } } + + @Override + public void onErrorListener(int error) { + enableRecordingLocation(false); + } } |