summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2015-01-04 00:11:36 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2015-01-04 00:11:36 -0800
commit7036b13af72d8bc62e416250f90f6c3d0f17d02a (patch)
tree59fc37644629028cfa71970d8696c7c45309e36b
parentf4b7f4496af70a54fb220b80267edf0e3d9db5b3 (diff)
parent735235c6e22c09b7f397e9c10c2a43e7fbfa2b5b (diff)
downloadandroid_packages_apps_Snap-7036b13af72d8bc62e416250f90f6c3d0f17d02a.tar.gz
android_packages_apps_Snap-7036b13af72d8bc62e416250f90f6c3d0f17d02a.tar.bz2
android_packages_apps_Snap-7036b13af72d8bc62e416250f90f6c3d0f17d02a.zip
Merge "SnapdragonCamera: Fix continuous shot not display location info"
-rw-r--r--src/com/android/camera/PhotoModule.java19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/com/android/camera/PhotoModule.java b/src/com/android/camera/PhotoModule.java
index f181fa0e3..32cd5dcf7 100644
--- a/src/com/android/camera/PhotoModule.java
+++ b/src/com/android/camera/PhotoModule.java
@@ -962,15 +962,16 @@ public class PhotoModule
mUI.doShutterAnimation();
+ Location loc = getLocationAccordPictureFormat(mParameters.get(KEY_PICTURE_FORMAT));
if (mLongshotSave) {
mCameraDevice.takePicture(mHandler,
new LongshotShutterCallback(),
mRawPictureCallback, mPostViewPictureCallback,
- new LongshotPictureCallback(null));
+ new LongshotPictureCallback(loc));
} else {
mCameraDevice.takePicture(mHandler,new LongshotShutterCallback(),
mRawPictureCallback, mPostViewPictureCallback,
- new JpegPictureCallback(null));
+ new JpegPictureCallback(loc));
}
}
}
@@ -1532,11 +1533,7 @@ public class PhotoModule
mJpegRotation = CameraUtil.getJpegRotation(mCameraId, orientation);
mParameters.setRotation(mJpegRotation);
String pictureFormat = mParameters.get(KEY_PICTURE_FORMAT);
- Location loc = null;
- if (pictureFormat != null &&
- PIXEL_FORMAT_JPEG.equalsIgnoreCase(pictureFormat)) {
- loc = mLocationManager.getCurrentLocation();
- }
+ Location loc = getLocationAccordPictureFormat(pictureFormat);
CameraUtil.setGpsParameters(mParameters, loc);
if (mRefocus) {
@@ -1601,6 +1598,14 @@ public class PhotoModule
setCameraParameters(UPDATE_PARAM_PREFERENCE);
}
+ private Location getLocationAccordPictureFormat(String pictureFormat) {
+ if (pictureFormat != null &&
+ PIXEL_FORMAT_JPEG.equalsIgnoreCase(pictureFormat)) {
+ return mLocationManager.getCurrentLocation();
+ }
+ return null;
+ }
+
private int getPreferredCameraId(ComboPreferences preferences) {
int intentCameraId = CameraUtil.getCameraFacingIntentExtras(mActivity);
if (intentCameraId != -1) {