diff options
author | Owen Lin <owenlin@google.com> | 2012-03-23 14:59:14 +0800 |
---|---|---|
committer | Owen Lin <owenlin@google.com> | 2012-04-02 17:17:52 +0800 |
commit | f52afa956baba2c616c70466080e8252224cf5de (patch) | |
tree | 6f356af583e82bdf432b3598f3e8be1141f8082b /src/com/android/gallery3d/app/PhotoPage.java | |
parent | 037e06c5e11ca4a4e40b0741f2d6604b2fd9337a (diff) | |
download | android_packages_apps_Snap-f52afa956baba2c616c70466080e8252224cf5de.tar.gz android_packages_apps_Snap-f52afa956baba2c616c70466080e8252224cf5de.tar.bz2 android_packages_apps_Snap-f52afa956baba2c616c70466080e8252224cf5de.zip |
Remove Position and PositionRepository.
Also fix a regression introduced in previous change.
Change-Id: I534c8ca7838f3518856cf48878dd49beeb331562
Diffstat (limited to 'src/com/android/gallery3d/app/PhotoPage.java')
-rw-r--r-- | src/com/android/gallery3d/app/PhotoPage.java | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/src/com/android/gallery3d/app/PhotoPage.java b/src/com/android/gallery3d/app/PhotoPage.java index 9a1992e54..050fad437 100644 --- a/src/com/android/gallery3d/app/PhotoPage.java +++ b/src/com/android/gallery3d/app/PhotoPage.java @@ -31,8 +31,8 @@ import android.view.Menu; import android.view.MenuInflater; import android.view.MenuItem; import android.view.View; -import android.view.ViewGroup; import android.view.View.MeasureSpec; +import android.view.ViewGroup; import android.view.WindowManager; import android.widget.ShareActionProvider; import android.widget.Toast; @@ -58,8 +58,6 @@ import com.android.gallery3d.ui.MenuExecutor; import com.android.gallery3d.ui.ScreenNail; import com.android.gallery3d.ui.ScreenNailHolder; import com.android.gallery3d.ui.PhotoView; -import com.android.gallery3d.ui.PositionRepository; -import com.android.gallery3d.ui.PositionRepository.Position; import com.android.gallery3d.ui.SelectionManager; import com.android.gallery3d.ui.SynchronizedHandler; import com.android.gallery3d.ui.UserInteractionListener; @@ -142,8 +140,6 @@ public class PhotoPage extends ActivityState protected void onLayout( boolean changed, int left, int top, int right, int bottom) { mPhotoView.layout(0, 0, right - left, bottom - top); - // Reset position offset after the layout is changed. - PositionRepository.getInstance(mActivity).setOffset(0, 0); int filmStripHeight = 0; if (mFilmStripView != null) { mFilmStripView.measure( @@ -428,17 +424,6 @@ public class PhotoPage extends ActivityState if (mShowDetails) { hideDetails(); } else { - PositionRepository repository = PositionRepository.getInstance(mActivity); - repository.clear(); - if (mCurrentPhoto != null) { - Position position = new Position(); - position.x = mRootPane.getWidth() / 2; - position.y = mRootPane.getHeight() / 2; - position.z = -1000; - repository.putPosition( - System.identityHashCode(mCurrentPhoto.getPath()), - position); - } super.onBackPressed(); } } @@ -653,9 +638,6 @@ public class PhotoPage extends ActivityState super.onResume(); mIsActive = true; setContentPane(mRootPane); - // Reset position offset for resuming. - PositionRepository.getInstance(mActivity).setOffset( - mPhotoView.bounds().left, mPhotoView.bounds().top); mModel.resume(); mPhotoView.resume(); |