summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWu-cheng Li <wuchengli@google.com>2012-10-14 22:34:06 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-10-14 22:34:07 -0700
commit7f1ad54dc6516d7b5cd7d5cabc6b96346186fce8 (patch)
tree2164dcd0022d18efd17300343ab4ee9a36fc6518
parent5ec40a6ba587fa8bd50958d263bb6fc6280de4c1 (diff)
parent294b9945e01ec41c1e9e58dfcd5d6e106ee2d538 (diff)
downloadandroid_packages_apps_Gallery2-7f1ad54dc6516d7b5cd7d5cabc6b96346186fce8.tar.gz
android_packages_apps_Gallery2-7f1ad54dc6516d7b5cd7d5cabc6b96346186fce8.tar.bz2
android_packages_apps_Gallery2-7f1ad54dc6516d7b5cd7d5cabc6b96346186fce8.zip
Merge "Add stitching panorama image to secure album." into gb-ub-photos-arches
-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) {
+ }
}