summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/ImageGallery2.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/camera/ImageGallery2.java')
-rw-r--r--src/com/android/camera/ImageGallery2.java16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/com/android/camera/ImageGallery2.java b/src/com/android/camera/ImageGallery2.java
index d58f04c..89afd9e 100644
--- a/src/com/android/camera/ImageGallery2.java
+++ b/src/com/android/camera/ImageGallery2.java
@@ -356,6 +356,20 @@ public class ImageGallery2 extends Activity {
if (Config.LOGV)
Log.v(TAG, "onActivityResult: " + requestCode + "; resultCode is " + resultCode + "; data is " + data);
switch (requestCode) {
+ case MenuHelper.RESULT_COMMON_MENU_CROP: {
+ if (resultCode == RESULT_OK) {
+ // The CropImage activity passes back the Uri of the cropped image as
+ // the Action rather than the Data.
+ Uri dataUri = Uri.parse(data.getAction());
+ rebake(false,false);
+ IImage image = mAllImages.getImageForUri(dataUri);
+ if (image != null ) {
+ int rowId = image.getRow();
+ mGvs.select(rowId, false);
+ }
+ }
+ break;
+ }
case CROP_MSG: {
if (Config.LOGV) Log.v(TAG, "onActivityResult " + data);
if (resultCode == RESULT_OK) {
@@ -627,7 +641,6 @@ public class ImageGallery2 extends Activity {
mNoImagesView = findViewById(R.id.no_images);
mInclusion = ImageManager.INCLUDE_IMAGES | ImageManager.INCLUDE_VIDEOS;
- ImageManager.DataLocation location = ImageManager.DataLocation.ALL;
Intent intent = getIntent();
if (intent != null) {
@@ -665,7 +678,6 @@ public class ImageGallery2 extends Activity {
if (extras != null && extras.getBoolean("pick-drm")) {
Log.d(TAG, "pick-drm is true");
mInclusion = ImageManager.INCLUDE_DRM_IMAGES;
- location = ImageManager.DataLocation.INTERNAL;
}
}
if (Config.LOGV)