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
diff --git a/src/com/android/camera/CameraActivity.java b/src/com/android/camera/CameraActivity.java
index c6f7afb..e688269 100644
--- a/src/com/android/camera/CameraActivity.java
+++ b/src/com/android/camera/CameraActivity.java
@@ -108,6 +108,7 @@
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 @@
}
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 8f1b360..81e34e9 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.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 @@
}
return null;
}
+
+ public static void setContentUri(Intent intent, Uri uri) {
+ // Do nothing.
+ }
}