diff options
author | George Mount <mount@google.com> | 2013-08-06 16:07:17 -0700 |
---|---|---|
committer | George Mount <mount@google.com> | 2013-08-07 07:55:49 -0700 |
commit | d1763a30cb0191e926467dc529e252b545ec9a9f (patch) | |
tree | 23c5866bcb207f00e3d2253dff10a04ba5f5bdb0 | |
parent | 43d50328a2dcd3ab22821ce5d20715ad206dca1c (diff) | |
download | android_packages_apps_Gallery2-d1763a30cb0191e926467dc529e252b545ec9a9f.tar.gz android_packages_apps_Gallery2-d1763a30cb0191e926467dc529e252b545ec9a9f.tar.bz2 android_packages_apps_Gallery2-d1763a30cb0191e926467dc529e252b545ec9a9f.zip |
Move PanoramaViewHelper out of LightCycleHelper
PanoramaViewHelper can be used outside of LightCycle panorama
picture creation.
Change-Id: I40bb357385fa311f9115dffaa143119cfcb5f45f
6 files changed, 48 insertions, 29 deletions
diff --git a/src/com/android/camera/CameraActivity.java b/src/com/android/camera/CameraActivity.java index 7114f6191..d4e7f1865 100644 --- a/src/com/android/camera/CameraActivity.java +++ b/src/com/android/camera/CameraActivity.java @@ -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 { diff --git a/src/com/android/camera/data/LocalData.java b/src/com/android/camera/data/LocalData.java index 852066bd3..74055230f 100644 --- a/src/com/android/camera/data/LocalData.java +++ b/src/com/android/camera/data/LocalData.java @@ -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; diff --git a/src/com/android/camera/ui/FilmStripView.java b/src/com/android/camera/ui/FilmStripView.java index f7f388341..8bc46b0d4 100644 --- a/src/com/android/camera/ui/FilmStripView.java +++ b/src/com/android/camera/ui/FilmStripView.java @@ -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") diff --git a/src/com/android/gallery3d/app/AbstractGalleryActivity.java b/src/com/android/gallery3d/app/AbstractGalleryActivity.java index ac39aa560..c4367c06d 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.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; } diff --git a/src_pd/com/android/gallery3d/util/LightCycleHelper.java b/src_pd/com/android/gallery3d/util/LightCycleHelper.java index 5cd910f8f..7ef7699df 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 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 index 000000000..2b1333a01 --- /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 */ + } +} |