summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Kondik <steve@cyngn.com>2016-08-21 00:52:26 -0700
committerSteve Kondik <steve@cyngn.com>2016-08-25 21:55:20 -0700
commit209f6c9ca736a21401dd31f662a0169b692b1000 (patch)
treed6f35039bbe70387a262d5a6b2aa51db08ab9759
parent5523f9b3370abcea4da5893e044e04e6a916d69d (diff)
downloadandroid_packages_apps_Snap-209f6c9ca736a21401dd31f662a0169b692b1000.zip
android_packages_apps_Snap-209f6c9ca736a21401dd31f662a0169b692b1000.tar.gz
android_packages_apps_Snap-209f6c9ca736a21401dd31f662a0169b692b1000.tar.bz2
camera2: More fixes
Change-Id: Ic1d125657efc96d71b5d7bd9e4e29c362fb600f8
-rw-r--r--src/com/android/camera/CaptureModule.java20
-rw-r--r--src/com/android/camera/CaptureUI.java11
-rw-r--r--src/com/android/camera/VideoModule.java9
-rw-r--r--src/com/android/camera/VideoUI.java1
4 files changed, 17 insertions, 24 deletions
diff --git a/src/com/android/camera/CaptureModule.java b/src/com/android/camera/CaptureModule.java
index 79b4d40..014b059 100644
--- a/src/com/android/camera/CaptureModule.java
+++ b/src/com/android/camera/CaptureModule.java
@@ -103,7 +103,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;
@@ -807,7 +808,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"));
}
@@ -1859,8 +1860,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
@@ -3065,4 +3074,9 @@ public class CaptureModule implements CameraModule, PhotoController,
}
}
}
+
+ @Override
+ public void onErrorListener(int error) {
+ enableRecordingLocation(false);
+ }
}
diff --git a/src/com/android/camera/CaptureUI.java b/src/com/android/camera/CaptureUI.java
index dfec5eb..c07c3cf 100644
--- a/src/com/android/camera/CaptureUI.java
+++ b/src/com/android/camera/CaptureUI.java
@@ -65,7 +65,6 @@ import java.util.Locale;
public class CaptureUI implements
PreviewGestures.SingleTapListener,
- LocationManager.Listener,
CameraManager.CameraFaceDetectionCallback,
SettingsManager.Listener,
ListMenu.Listener,
@@ -1387,16 +1386,6 @@ public class CaptureUI implements
}
@Override
- public void showGpsOnScreenIndicator(boolean hasSignal) {
-
- }
-
- @Override
- public void hideGpsOnScreenIndicator() {
-
- }
-
- @Override
public void onSingleTapUp(View view, int x, int y) {
mModule.onSingleTapUp(view, x, y);
}
diff --git a/src/com/android/camera/VideoModule.java b/src/com/android/camera/VideoModule.java
index b8537c2..bdfc78b 100644
--- a/src/com/android/camera/VideoModule.java
+++ b/src/com/android/camera/VideoModule.java
@@ -563,14 +563,6 @@ public class VideoModule implements CameraModule,
}
@Override
- public void startFaceDetection() {
- }
-
- @Override
- public void stopFaceDetection() {
- }
-
- @Override
public void setFocusParameters() {
if (mFocusAreaSupported)
mParameters.setFocusAreas(mFocusManager.getFocusAreas());
@@ -3108,7 +3100,6 @@ public class VideoModule implements CameraModule,
enableRecordingLocation(false);
}
-
public void startFaceDetection() {
if (mCameraDevice == null) return;
diff --git a/src/com/android/camera/VideoUI.java b/src/com/android/camera/VideoUI.java
index 01a7f70..5af4ff2 100644
--- a/src/com/android/camera/VideoUI.java
+++ b/src/com/android/camera/VideoUI.java
@@ -1225,6 +1225,5 @@ public class VideoUI implements PieRenderer.PieListener,
mFaceView.setBlockDraw(true);
mFaceView.clear();
}
->>>>>>> 7252fd0... SnapdragonCamera: Add face detection icon to video
}
}