summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRuben Brunk <rubenbrunk@google.com>2013-10-11 11:30:57 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-10-11 11:30:57 -0700
commit2e30f90a571dd7774e3c0bf32d370a63b2461a93 (patch)
tree575156c7ea322a0daaa747a4933b6ece6f5fbc7d
parent1f8c42419304742b20ff88a18f938a88f01b895c (diff)
parentf06221914bf40b6345cacd1a5904d773c6eddcb0 (diff)
downloadandroid_packages_apps_Snap-2e30f90a571dd7774e3c0bf32d370a63b2461a93.tar.gz
android_packages_apps_Snap-2e30f90a571dd7774e3c0bf32d370a63b2461a93.tar.bz2
android_packages_apps_Snap-2e30f90a571dd7774e3c0bf32d370a63b2461a93.zip
am f0622191: Merge "gcam: Allow debugging postcapture image to be added to mediastore." into gb-ub-photos-carlsbad
* commit 'f06221914bf40b6345cacd1a5904d773c6eddcb0': gcam: Allow debugging postcapture image to be added to mediastore.
-rw-r--r--src/com/android/camera/PhotoModule.java19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/com/android/camera/PhotoModule.java b/src/com/android/camera/PhotoModule.java
index 3dbf4efe0..8699ef092 100644
--- a/src/com/android/camera/PhotoModule.java
+++ b/src/com/android/camera/PhotoModule.java
@@ -112,6 +112,8 @@ public class PhotoModule
// after screen on if the activity is started from secure lock screen.
private static final int KEEP_CAMERA_TIMEOUT = 1000; // ms
+ private static final String DEBUG_IMAGE_PREFIX = "DEBUG_";
+
// copied from Camera hierarchy
private CameraActivity mActivity;
private CameraProxy mCameraDevice;
@@ -707,10 +709,7 @@ public class PhotoModule
ExifInterface exif = Exif.getExif(jpegData);
int orientation = Exif.getOrientation(exif);
- if (mDebugUri != null) {
- // If using a debug uri, save jpeg there
- saveToDebugUri(jpegData);
- }else if (!mIsImageCaptureIntent) {
+ if (!mIsImageCaptureIntent) {
// Calculate the width and the height of the jpeg.
Size s = mParameters.getPictureSize();
int width, height;
@@ -724,6 +723,18 @@ public class PhotoModule
NamedEntity name = mNamedImages.getNextNameEntity();
String title = (name == null) ? null : name.title;
long date = (name == null) ? -1 : name.date;
+
+ // Handle debug mode outputs
+ if (mDebugUri != null) {
+ // If using a debug uri, save jpeg there.
+ saveToDebugUri(jpegData);
+
+ // Adjust the title of the debug image shown in mediastore.
+ if (title != null) {
+ title = DEBUG_IMAGE_PREFIX + title;
+ }
+ }
+
if (title == null) {
Log.e(TAG, "Unbalanced name/data pair");
} else {