summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/VideoModule.java
diff options
context:
space:
mode:
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);
+ }
+
}
+