summaryrefslogtreecommitdiffstats
path: root/src/com/android/gallery3d/app
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/gallery3d/app')
-rw-r--r--src/com/android/gallery3d/app/GalleryApp.java2
-rw-r--r--src/com/android/gallery3d/app/GalleryAppImpl.java9
-rw-r--r--src/com/android/gallery3d/app/PhotoPage.java5
-rw-r--r--src/com/android/gallery3d/app/StitchingChangeListener.java26
4 files changed, 42 insertions, 0 deletions
diff --git a/src/com/android/gallery3d/app/GalleryApp.java b/src/com/android/gallery3d/app/GalleryApp.java
index a2d74945f..b56b8a82c 100644
--- a/src/com/android/gallery3d/app/GalleryApp.java
+++ b/src/com/android/gallery3d/app/GalleryApp.java
@@ -28,6 +28,8 @@ import com.android.gallery3d.util.ThreadPool;
public interface GalleryApp {
public DataManager getDataManager();
+
+ public StitchingProgressManager getStitchingProgressManager();
public ImageCacheService getImageCacheService();
public DownloadCache getDownloadCache();
public ThreadPool getThreadPool();
diff --git a/src/com/android/gallery3d/app/GalleryAppImpl.java b/src/com/android/gallery3d/app/GalleryAppImpl.java
index 9576093a4..c4507b340 100644
--- a/src/com/android/gallery3d/app/GalleryAppImpl.java
+++ b/src/com/android/gallery3d/app/GalleryAppImpl.java
@@ -30,6 +30,7 @@ import com.android.gallery3d.gadget.WidgetUtils;
import com.android.gallery3d.photoeditor.PhotoEditor;
import com.android.gallery3d.picasasource.PicasaSource;
import com.android.gallery3d.util.GalleryUtils;
+import com.android.gallery3d.util.LightCycleHelper;
import com.android.gallery3d.util.ThreadPool;
import java.io.File;
@@ -44,6 +45,7 @@ public class GalleryAppImpl extends Application implements GalleryApp {
private DataManager mDataManager;
private ThreadPool mThreadPool;
private DownloadCache mDownloadCache;
+ private StitchingProgressManager mStitchingProgressManager;
@Override
public void onCreate() {
@@ -59,6 +61,8 @@ public class GalleryAppImpl extends Application implements GalleryApp {
getPackageManager().setComponentEnabledSetting(
new ComponentName(this, PhotoEditor.class),
state, PackageManager.DONT_KILL_APP);
+
+ mStitchingProgressManager = LightCycleHelper.createStitchingManagerInstance(this);
}
@Override
@@ -76,6 +80,11 @@ public class GalleryAppImpl extends Application implements GalleryApp {
}
@Override
+ public StitchingProgressManager getStitchingProgressManager() {
+ return mStitchingProgressManager;
+ }
+
+ @Override
public ImageCacheService getImageCacheService() {
// This method may block on file I/O so a dedicated lock is needed here.
synchronized (mLock) {
diff --git a/src/com/android/gallery3d/app/PhotoPage.java b/src/com/android/gallery3d/app/PhotoPage.java
index c60c3b9e2..2a088b1fa 100644
--- a/src/com/android/gallery3d/app/PhotoPage.java
+++ b/src/com/android/gallery3d/app/PhotoPage.java
@@ -371,6 +371,11 @@ public class PhotoPage extends ActivityState implements
mSetPathString = "/filter/empty/{"+mSetPathString+"}";
}
+ // Add support for showing panorama progress.
+ if (LightCycleHelper.hasLightCycleCapture(mActivity.getAndroidContext())) {
+ mSetPathString = LightCycleHelper.wrapGalleryPath(mSetPathString);
+ }
+
// Combine the original MediaSet with the one for ScreenNail
// from AppBridge.
mSetPathString = "/combo/item/{" + screenNailSetPath +
diff --git a/src/com/android/gallery3d/app/StitchingChangeListener.java b/src/com/android/gallery3d/app/StitchingChangeListener.java
new file mode 100644
index 000000000..901f37967
--- /dev/null
+++ b/src/com/android/gallery3d/app/StitchingChangeListener.java
@@ -0,0 +1,26 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.gallery3d.app;
+
+
+public interface StitchingChangeListener {
+ public void onFileAdded(String filePath);
+
+ public void onFileRemoved(String filePath);
+
+ public void onProgressChanged(String filePath, int progress);
+}