summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBobby Georgescu <georgescu@google.com>2012-11-05 14:12:51 -0800
committerBobby Georgescu <georgescu@google.com>2012-11-05 15:14:27 -0800
commitb0e3eba1c4d03192986b6cc240b04cd5c98f620b (patch)
tree37b2258d2ca14cb91455307e9d67754e48c4c832 /src
parent43ab5e5519fc5a95f45c4f29553b657840989ba7 (diff)
downloadandroid_packages_apps_Snap-b0e3eba1c4d03192986b6cc240b04cd5c98f620b.tar.gz
android_packages_apps_Snap-b0e3eba1c4d03192986b6cc240b04cd5c98f620b.tar.bz2
android_packages_apps_Snap-b0e3eba1c4d03192986b6cc240b04cd5c98f620b.zip
Split PhotoPage into FilmstripPage and SinglePhotoPage
Bug: 7479348 Change-Id: I98f668bd00e2e09bda9d5d9965fdbdaf1b832bfa
Diffstat (limited to 'src')
-rw-r--r--src/com/android/gallery3d/app/ActivityState.java4
-rw-r--r--src/com/android/gallery3d/app/AlbumPage.java6
-rw-r--r--src/com/android/gallery3d/app/AlbumSetPage.java2
-rw-r--r--src/com/android/gallery3d/app/FilmstripPage.java21
-rw-r--r--src/com/android/gallery3d/app/Gallery.java2
-rw-r--r--src/com/android/gallery3d/app/PhotoPage.java4
-rw-r--r--src/com/android/gallery3d/app/SinglePhotoPage.java21
7 files changed, 51 insertions, 9 deletions
diff --git a/src/com/android/gallery3d/app/ActivityState.java b/src/com/android/gallery3d/app/ActivityState.java
index e74c0174f..b2e39b1cb 100644
--- a/src/com/android/gallery3d/app/ActivityState.java
+++ b/src/com/android/gallery3d/app/ActivityState.java
@@ -170,9 +170,9 @@ abstract public class ActivityState {
protected void transitionOnNextPause(Class<? extends ActivityState> outgoing,
Class<? extends ActivityState> incoming, StateTransitionAnimation.Transition hint) {
- if (outgoing == PhotoPage.class && incoming == AlbumPage.class) {
+ if (outgoing == SinglePhotoPage.class && incoming == AlbumPage.class) {
mNextTransition = StateTransitionAnimation.Transition.Outgoing;
- } else if (outgoing == AlbumPage.class && incoming == PhotoPage.class) {
+ } else if (outgoing == AlbumPage.class && incoming == SinglePhotoPage.class) {
mNextTransition = StateTransitionAnimation.Transition.PhotoIncoming;
} else {
mNextTransition = hint;
diff --git a/src/com/android/gallery3d/app/AlbumPage.java b/src/com/android/gallery3d/app/AlbumPage.java
index dd31b04e6..e1c061318 100644
--- a/src/com/android/gallery3d/app/AlbumPage.java
+++ b/src/com/android/gallery3d/app/AlbumPage.java
@@ -303,10 +303,10 @@ public class AlbumPage extends ActivityState implements GalleryActionBar.Cluster
startInFilmstrip);
data.putBoolean(PhotoPage.KEY_IN_CAMERA_ROLL, mMediaSet.isCameraRoll());
if (startInFilmstrip) {
- mActivity.getStateManager().switchState(this, PhotoPage.class, data);
+ mActivity.getStateManager().switchState(this, FilmstripPage.class, data);
} else {
mActivity.getStateManager().startStateForResult(
- PhotoPage.class, REQUEST_PHOTO, data);
+ SinglePhotoPage.class, REQUEST_PHOTO, data);
}
}
}
@@ -377,7 +377,7 @@ public class AlbumPage extends ActivityState implements GalleryActionBar.Cluster
}
mLaunchedFromPhotoPage =
- mActivity.getStateManager().hasStateClass(PhotoPage.class);
+ mActivity.getStateManager().hasStateClass(FilmstripPage.class);
mInCameraApp = data.getBoolean(PhotoPage.KEY_APP_BRIDGE, false);
mHandler = new SynchronizedHandler(mActivity.getGLRoot()) {
diff --git a/src/com/android/gallery3d/app/AlbumSetPage.java b/src/com/android/gallery3d/app/AlbumSetPage.java
index 038d34895..ed06f46ae 100644
--- a/src/com/android/gallery3d/app/AlbumSetPage.java
+++ b/src/com/android/gallery3d/app/AlbumSetPage.java
@@ -274,7 +274,7 @@ public class AlbumSetPage extends ActivityState implements
data.putBoolean(PhotoPage.KEY_START_IN_FILMSTRIP, true);
data.putBoolean(PhotoPage.KEY_IN_CAMERA_ROLL, targetSet.isCameraRoll());
mActivity.getStateManager().startStateForResult(
- PhotoPage.class, AlbumPage.REQUEST_PHOTO, data);
+ FilmstripPage.class, AlbumPage.REQUEST_PHOTO, data);
return;
}
data.putString(AlbumPage.KEY_MEDIA_PATH, mediaPath);
diff --git a/src/com/android/gallery3d/app/FilmstripPage.java b/src/com/android/gallery3d/app/FilmstripPage.java
new file mode 100644
index 000000000..a9726cdc9
--- /dev/null
+++ b/src/com/android/gallery3d/app/FilmstripPage.java
@@ -0,0 +1,21 @@
+/*
+ * 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 class FilmstripPage extends PhotoPage {
+
+}
diff --git a/src/com/android/gallery3d/app/Gallery.java b/src/com/android/gallery3d/app/Gallery.java
index 4954b935d..354e325d4 100644
--- a/src/com/android/gallery3d/app/Gallery.java
+++ b/src/com/android/gallery3d/app/Gallery.java
@@ -215,7 +215,7 @@ public final class Gallery extends AbstractGalleryActivity implements OnCancelLi
}
}
- getStateManager().startState(PhotoPage.class, data);
+ getStateManager().startState(SinglePhotoPage.class, data);
}
}
}
diff --git a/src/com/android/gallery3d/app/PhotoPage.java b/src/com/android/gallery3d/app/PhotoPage.java
index 097c622be..821bf4532 100644
--- a/src/com/android/gallery3d/app/PhotoPage.java
+++ b/src/com/android/gallery3d/app/PhotoPage.java
@@ -72,7 +72,7 @@ import com.android.gallery3d.ui.SelectionManager;
import com.android.gallery3d.ui.SynchronizedHandler;
import com.android.gallery3d.util.GalleryUtils;
-public class PhotoPage extends ActivityState implements
+public abstract class PhotoPage extends ActivityState implements
PhotoView.Listener, OrientationManager.Listener, AppBridge.Server,
PhotoPageBottomControls.Delegate, GalleryActionBar.OnAlbumModeSelectedListener {
private static final String TAG = "PhotoPage";
@@ -1244,7 +1244,7 @@ public class PhotoPage extends ActivityState implements
Bundle data = new Bundle(getData());
data.putString(KEY_MEDIA_SET_PATH, albumPath.toString());
data.putString(PhotoPage.KEY_MEDIA_ITEM_PATH, path.toString());
- mActivity.getStateManager().startState(PhotoPage.class, data);
+ mActivity.getStateManager().startState(SinglePhotoPage.class, data);
return;
}
mModel.setCurrentPhoto(path, mCurrentIndex);
diff --git a/src/com/android/gallery3d/app/SinglePhotoPage.java b/src/com/android/gallery3d/app/SinglePhotoPage.java
new file mode 100644
index 000000000..beb87d358
--- /dev/null
+++ b/src/com/android/gallery3d/app/SinglePhotoPage.java
@@ -0,0 +1,21 @@
+/*
+ * 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 class SinglePhotoPage extends PhotoPage {
+
+}