Move PanoramaViewHelper out of LightCycleHelper
PanoramaViewHelper can be used outside of LightCycle panorama
picture creation.
Change-Id: I40bb357385fa311f9115dffaa143119cfcb5f45f
diff --git a/src/com/android/camera/CameraActivity.java b/src/com/android/camera/CameraActivity.java
index 7114f61..d4e7f18 100644
--- a/src/com/android/camera/CameraActivity.java
+++ b/src/com/android/camera/CameraActivity.java
@@ -55,8 +55,8 @@
import com.android.gallery3d.R;
import com.android.gallery3d.common.ApiHelper;
import com.android.gallery3d.util.LightCycleHelper;
+import com.android.gallery3d.util.PanoramaViewHelper;
import com.android.gallery3d.util.RefocusHelper;
-import com.android.gallery3d.util.LightCycleHelper.PanoramaViewHelper;
public class CameraActivity extends Activity
implements CameraSwitchListener {
diff --git a/src/com/android/camera/data/LocalData.java b/src/com/android/camera/data/LocalData.java
index 852066b..7405523 100644
--- a/src/com/android/camera/data/LocalData.java
+++ b/src/com/android/camera/data/LocalData.java
@@ -28,7 +28,6 @@
import android.net.Uri;
import android.os.AsyncTask;
import android.provider.MediaStore;
-import android.provider.MediaStore.Images;
import android.provider.MediaStore.Images.ImageColumns;
import android.provider.MediaStore.Video.VideoColumns;
import android.util.Log;
@@ -44,7 +43,7 @@
import com.android.camera.ui.FilmStripView;
import com.android.gallery3d.R;
import com.android.gallery3d.util.LightCycleHelper.PanoramaMetadata;
-import com.android.gallery3d.util.LightCycleHelper.PanoramaViewHelper;
+import com.android.gallery3d.util.PanoramaViewHelper;
import java.io.File;
import java.util.Comparator;
diff --git a/src/com/android/camera/ui/FilmStripView.java b/src/com/android/camera/ui/FilmStripView.java
index f7f3883..8bc46b0 100644
--- a/src/com/android/camera/ui/FilmStripView.java
+++ b/src/com/android/camera/ui/FilmStripView.java
@@ -34,7 +34,7 @@
import com.android.camera.ui.FilmStripView.ImageData.PanoramaSupportCallback;
import com.android.gallery3d.R;
-import com.android.gallery3d.util.LightCycleHelper.PanoramaViewHelper;
+import com.android.gallery3d.util.PanoramaViewHelper;
public class FilmStripView extends ViewGroup {
@SuppressWarnings("unused")
diff --git a/src/com/android/gallery3d/app/AbstractGalleryActivity.java b/src/com/android/gallery3d/app/AbstractGalleryActivity.java
index ac39aa5..c4367c0 100644
--- a/src/com/android/gallery3d/app/AbstractGalleryActivity.java
+++ b/src/com/android/gallery3d/app/AbstractGalleryActivity.java
@@ -42,7 +42,7 @@
import com.android.gallery3d.data.MediaItem;
import com.android.gallery3d.ui.GLRoot;
import com.android.gallery3d.ui.GLRootView;
-import com.android.gallery3d.util.LightCycleHelper.PanoramaViewHelper;
+import com.android.gallery3d.util.PanoramaViewHelper;
import com.android.gallery3d.util.ThreadPool;
import com.android.photos.data.GalleryBitmapPool;
@@ -311,10 +311,12 @@
private BatchService mBatchService;
private boolean mBatchServiceIsBound = false;
private ServiceConnection mBatchServiceConnection = new ServiceConnection() {
+ @Override
public void onServiceConnected(ComponentName className, IBinder service) {
mBatchService = ((BatchService.LocalBinder)service).getService();
}
+ @Override
public void onServiceDisconnected(ComponentName className) {
mBatchService = null;
}
diff --git a/src_pd/com/android/gallery3d/util/LightCycleHelper.java b/src_pd/com/android/gallery3d/util/LightCycleHelper.java
index 5cd910f..7ef7699 100644
--- a/src_pd/com/android/gallery3d/util/LightCycleHelper.java
+++ b/src_pd/com/android/gallery3d/util/LightCycleHelper.java
@@ -16,7 +16,6 @@
package com.android.gallery3d.util;
-import android.app.Activity;
import android.content.ContentResolver;
import android.content.Context;
import android.content.Intent;
@@ -39,29 +38,6 @@
}
}
- public static class PanoramaViewHelper {
-
- public PanoramaViewHelper(Activity activity) {
- /* Do nothing */
- }
-
- public void onStart() {
- /* Do nothing */
- }
-
- public void onCreate() {
- /* Do nothing */
- }
-
- public void onStop() {
- /* Do nothing */
- }
-
- public void showPanorama(Uri uri) {
- /* Do nothing */
- }
- }
-
public static final PanoramaMetadata NOT_PANORAMA = new PanoramaMetadata(false, false);
public static void setupCaptureIntent(Context context, Intent it, String outputDir) {
diff --git a/src_pd/com/android/gallery3d/util/PanoramaViewHelper.java b/src_pd/com/android/gallery3d/util/PanoramaViewHelper.java
new file mode 100644
index 0000000..2b1333a
--- /dev/null
+++ b/src_pd/com/android/gallery3d/util/PanoramaViewHelper.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2013 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.util;
+
+import android.app.Activity;
+import android.net.Uri;
+
+public class PanoramaViewHelper {
+
+ public PanoramaViewHelper(Activity activity) {
+ /* Do nothing */
+ }
+
+ public void onStart() {
+ /* Do nothing */
+ }
+
+ public void onCreate() {
+ /* Do nothing */
+ }
+
+ public void onStop() {
+ /* Do nothing */
+ }
+
+ public void showPanorama(Uri uri) {
+ /* Do nothing */
+ }
+}