summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkaiyiz <kaiyiz@codeaurora.org>2014-12-18 14:59:43 +0800
committerGerrit - the friendly Code Review server <code-review@localhost>2015-01-03 20:49:56 -0800
commit735235c6e22c09b7f397e9c10c2a43e7fbfa2b5b (patch)
tree59fc37644629028cfa71970d8696c7c45309e36b
parentf4b7f4496af70a54fb220b80267edf0e3d9db5b3 (diff)
downloadandroid_packages_apps_Snap-735235c6e22c09b7f397e9c10c2a43e7fbfa2b5b.tar.gz
android_packages_apps_Snap-735235c6e22c09b7f397e9c10c2a43e7fbfa2b5b.tar.bz2
android_packages_apps_Snap-735235c6e22c09b7f397e9c10c2a43e7fbfa2b5b.zip
SnapdragonCamera: Fix continuous shot not display location info
Location info isn't write into the Media Database when store image, which leadcore location info couldn't show in details. Get the location info and write it into media database during longshot. CRs-Fixed: 708198 Change-Id: I5e4aa982e7689244a511865536f54a05a852d3f2
-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) {