summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/VideoModule.java
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2016-07-25 21:06:11 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2016-07-25 21:06:11 -0700
commit9f65ee95c61d70d6f7c34cd8bedea61ff1cdf2d1 (patch)
tree56bb55da9d21fbbeea5a506cdc88e37645326de3 /src/com/android/camera/VideoModule.java
parent700f374f96450c57c51a009ea4de7cf8c35f1d7e (diff)
parent56aabdf703779b97ef40cbef8fcde2620a379028 (diff)
downloadandroid_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/VideoModule.java')
-rwxr-xr-xsrc/com/android/camera/VideoModule.java27
1 files changed, 26 insertions, 1 deletions
diff --git a/src/com/android/camera/VideoModule.java b/src/com/android/camera/VideoModule.java
index ab576acb6..6b26a9c88 100755
--- a/src/com/android/camera/VideoModule.java
+++ b/src/com/android/camera/VideoModule.java
@@ -85,6 +85,7 @@ public class VideoModule implements CameraModule,
VideoController,
CameraPreference.OnPreferenceChangedListener,
ShutterButton.OnShutterButtonListener,
+ LocationManager.Listener,
MediaRecorder.OnErrorListener,
MediaRecorder.OnInfoListener {
@@ -519,7 +520,7 @@ public class VideoModule implements CameraModule,
mUI.setPrefChangedListener(this);
mQuickCapture = mActivity.getIntent().getBooleanExtra(EXTRA_QUICK_CAPTURE, false);
- mLocationManager = new LocationManager(mActivity, null);
+ mLocationManager = new LocationManager(mActivity, this);
mUI.setOrientationIndicator(0, false);
setDisplayOrientation();
@@ -532,6 +533,23 @@ public class VideoModule implements CameraModule,
mPendingSwitchCameraId = -1;
}
+ @Override
+ public void waitingLocationPermissionResult(boolean result) {
+ mLocationManager.waitingLocationPermissionResult(result);
+ }
+
+ @Override
+ public void enableRecordingLocation(boolean enable) {
+ String value = (enable ? RecordLocationPreference.VALUE_ON
+ : RecordLocationPreference.VALUE_OFF);
+ if (mPreferences != null) {
+ mPreferences.edit()
+ .putString(CameraSettings.KEY_RECORD_LOCATION, value)
+ .apply();
+ }
+ mLocationManager.recordLocation(enable);
+ }
+
// SingleTapListener
// Preview area is touched. Take a picture.
@Override
@@ -3051,4 +3069,11 @@ public class VideoModule implements CameraModule,
mUI.onStopFaceDetection();
}
}
+
+ @Override
+ public void onErrorListener(int error) {
+ enableRecordingLocation(false);
+ }
+
}
+