From 80461c2de3ee7f12e17e9951567a843c500b8fe1 Mon Sep 17 00:00:00 2001 From: Alan Newberger Date: Mon, 3 Feb 2014 15:03:26 -0800 Subject: [PATCH] Add content URI for current filmstrip item to Gallery intent when starting Gallery, if there is a current filmstrip ID, retrieve its content URI and pass to the GalleryHelper to process it. Do nothing within the GalleryHelper at this time. Bug: 12587688 Change-Id: I5becbfa7d12e739383b9f2ef3d3dba7460fa3d25 --- src/com/android/camera/CameraActivity.java | 9 ++++++++- src_pd/com/android/camera/util/GalleryHelper.java | 5 +++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/com/android/camera/CameraActivity.java b/src/com/android/camera/CameraActivity.java index c6f7afb2b..e68826993 100644 --- a/src/com/android/camera/CameraActivity.java +++ b/src/com/android/camera/CameraActivity.java @@ -108,6 +108,7 @@ import com.android.camera.ui.SettingsView; import com.android.camera.util.ApiHelper; import com.android.camera.util.CameraUtil; import com.android.camera.util.FeedbackHelper; +import com.android.camera.util.GalleryHelper; import com.android.camera.util.GcamHelper; import com.android.camera.util.IntentHelper; import com.android.camera.util.PhotoSphereHelper.PanoramaViewHelper; @@ -1878,7 +1879,13 @@ public class CameraActivity extends Activity } try { UsageStatistics.changeScreen(NavigationChange.Mode.GALLERY, InteractionCause.BUTTON); - launchActivityByIntent(new Intent(mGalleryIntent)); + Intent startGalleryIntent = new Intent(mGalleryIntent); + int currentDataId = mFilmstripController.getCurrentId(); + LocalData currentLocalData = mDataAdapter.getLocalData(currentDataId); + if (currentLocalData != null) { + GalleryHelper.setContentUri(startGalleryIntent, currentLocalData.getContentUri()); + } + launchActivityByIntent(startGalleryIntent); } catch (ActivityNotFoundException e) { Log.w(TAG, "Failed to launch gallery activity, closing"); } diff --git a/src_pd/com/android/camera/util/GalleryHelper.java b/src_pd/com/android/camera/util/GalleryHelper.java index 8f1b360c4..81e34e9ee 100644 --- a/src_pd/com/android/camera/util/GalleryHelper.java +++ b/src_pd/com/android/camera/util/GalleryHelper.java @@ -19,6 +19,7 @@ import android.content.Context; import android.content.Intent; import android.content.pm.PackageManager; import android.graphics.drawable.Drawable; +import android.net.Uri; /** * A helper class to provide Gallery related info. @@ -42,4 +43,8 @@ public class GalleryHelper { } return null; } + + public static void setContentUri(Intent intent, Uri uri) { + // Do nothing. + } } -- 2.11.0