OSDN Git Service

Move PanoramaViewHelper out of LightCycleHelper
authorGeorge Mount <mount@google.com>
Tue, 6 Aug 2013 23:07:17 +0000 (16:07 -0700)
committerGeorge Mount <mount@google.com>
Wed, 7 Aug 2013 14:55:49 +0000 (07:55 -0700)
PanoramaViewHelper can be used outside of LightCycle panorama
picture creation.

Change-Id: I40bb357385fa311f9115dffaa143119cfcb5f45f

src/com/android/camera/CameraActivity.java
src/com/android/camera/data/LocalData.java
src/com/android/camera/ui/FilmStripView.java
src/com/android/gallery3d/app/AbstractGalleryActivity.java
src_pd/com/android/gallery3d/util/LightCycleHelper.java
src_pd/com/android/gallery3d/util/PanoramaViewHelper.java [new file with mode: 0644]

index 7114f61..d4e7f18 100644 (file)
@@ -55,8 +55,8 @@ import com.android.camera.ui.FilmStripView;
 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 {
index 852066b..7405523 100644 (file)
@@ -28,7 +28,6 @@ import android.media.MediaMetadataRetriever;
 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.data.PanoramaMetadataLoader.PanoramaMetadataCallback;
 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;
index f7f3883..8bc46b0 100644 (file)
@@ -34,7 +34,7 @@ import android.widget.Scroller;
 
 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")
index ac39aa5..c4367c0 100644 (file)
@@ -42,7 +42,7 @@ import com.android.gallery3d.data.DataManager;
 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 @@ public class AbstractGalleryActivity extends Activity implements GalleryContext
     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;
         }
index 5cd910f..7ef7699 100644 (file)
@@ -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 class LightCycleHelper {
         }
     }
 
-    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 (file)
index 0000000..2b1333a
--- /dev/null
@@ -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 */
+    }
+}