summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/VideoModule.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/camera/VideoModule.java')
-rw-r--r--src/com/android/camera/VideoModule.java26
1 files changed, 25 insertions, 1 deletions
diff --git a/src/com/android/camera/VideoModule.java b/src/com/android/camera/VideoModule.java
index a9e6074ae..ed20b9119 100644
--- a/src/com/android/camera/VideoModule.java
+++ b/src/com/android/camera/VideoModule.java
@@ -85,6 +85,7 @@ public class VideoModule implements CameraModule,
FocusOverlayManager.Listener,
CameraPreference.OnPreferenceChangedListener,
ShutterButton.OnShutterButtonListener,
+ LocationManager.Listener,
MediaRecorder.OnErrorListener,
MediaRecorder.OnInfoListener {
@@ -497,7 +498,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();
@@ -564,6 +565,23 @@ public class VideoModule implements CameraModule,
}
}
+ @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
@@ -3011,4 +3029,10 @@ public class VideoModule implements CameraModule,
resumeVideoRecording();
}
+ @Override
+ public void onErrorListener(int error) {
+ enableRecordingLocation(false);
+ }
+
}
+