summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWu-cheng Li <wuchengli@google.com>2012-10-13 15:07:27 +0800
committerWu-cheng Li <wuchengli@google.com>2012-10-13 15:07:27 +0800
commitef1a61cb5470decd3ddf3729217ff1549eaeed43 (patch)
tree786908275ec2e77d78bdf9cd83f9f6ca2eb51876
parentb3e8fc2def7b3995c3b558d8594eb573defedf82 (diff)
downloadandroid_packages_apps_Snap-ef1a61cb5470decd3ddf3729217ff1549eaeed43.tar.gz
android_packages_apps_Snap-ef1a61cb5470decd3ddf3729217ff1549eaeed43.tar.bz2
android_packages_apps_Snap-ef1a61cb5470decd3ddf3729217ff1549eaeed43.zip
Add stitching panorama image to secure album.
bug:7285105 Change-Id: I9f609f30d817f10a6c9c94fc6eadb58bc1bdd580
-rw-r--r--src/com/android/gallery3d/app/PhotoPage.java3
-rw-r--r--src/com/android/gallery3d/data/SecureAlbum.java17
2 files changed, 19 insertions, 1 deletions
diff --git a/src/com/android/gallery3d/app/PhotoPage.java b/src/com/android/gallery3d/app/PhotoPage.java
index 5527c9e21..b11229f88 100644
--- a/src/com/android/gallery3d/app/PhotoPage.java
+++ b/src/com/android/gallery3d/app/PhotoPage.java
@@ -562,6 +562,9 @@ public class PhotoPage extends ActivityState implements
mProgressBar = new PhotoPageProgressBar(mActivity, galleryRoot);
mProgressListener = new UpdateProgressListener();
progressManager.addChangeListener(mProgressListener);
+ if (mSecureAlbum != null) {
+ progressManager.addChangeListener(mSecureAlbum);
+ }
}
}
}
diff --git a/src/com/android/gallery3d/data/SecureAlbum.java b/src/com/android/gallery3d/data/SecureAlbum.java
index c666bdc75..0a8c5a827 100644
--- a/src/com/android/gallery3d/data/SecureAlbum.java
+++ b/src/com/android/gallery3d/data/SecureAlbum.java
@@ -24,12 +24,13 @@ import android.provider.MediaStore.MediaColumns;
import android.provider.MediaStore.Video;
import com.android.gallery3d.app.GalleryApp;
+import com.android.gallery3d.app.StitchingChangeListener;
import com.android.gallery3d.util.MediaSetUtils;
import java.util.ArrayList;
// This class lists all media items added by the client.
-public class SecureAlbum extends MediaSet {
+public class SecureAlbum extends MediaSet implements StitchingChangeListener {
@SuppressWarnings("unused")
private static final String TAG = "SecureAlbum";
private static final String[] PROJECTION = {MediaColumns._ID};
@@ -183,4 +184,18 @@ public class SecureAlbum extends MediaSet {
public boolean isLeafAlbum() {
return true;
}
+
+ @Override
+ public void onStitchingQueued(Uri uri) {
+ int id = Integer.parseInt(uri.getLastPathSegment());
+ addMediaItem(false, id);
+ }
+
+ @Override
+ public void onStitchingResult(Uri uri) {
+ }
+
+ @Override
+ public void onStitchingProgress(Uri uri, final int progress) {
+ }
}