diff options
| author | Bobby Georgescu <georgescu@google.com> | 2012-10-07 12:15:56 -0700 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-10-07 12:15:57 -0700 |
| commit | 4de36129b57e3a5308c109a407ea17b4fa103fe4 (patch) | |
| tree | 6a8ce06487f9a8b3249188bd4f752544f758b7b1 /src | |
| parent | 43ba9f6644e4183b8ee27f96de3dda703d136c52 (diff) | |
| parent | d2724f69edf39cf2019eac1b49f316d22ab70d0a (diff) | |
| download | android_packages_apps_Gallery2-4de36129b57e3a5308c109a407ea17b4fa103fe4.tar.gz android_packages_apps_Gallery2-4de36129b57e3a5308c109a407ea17b4fa103fe4.tar.bz2 android_packages_apps_Gallery2-4de36129b57e3a5308c109a407ea17b4fa103fe4.zip | |
Merge "Change display of 360 panorama button" into gb-ub-photos-arches
Diffstat (limited to 'src')
| -rw-r--r-- | src/com/android/gallery3d/app/PhotoPage.java | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/com/android/gallery3d/app/PhotoPage.java b/src/com/android/gallery3d/app/PhotoPage.java index a219f51e4..cd8b80259 100644 --- a/src/com/android/gallery3d/app/PhotoPage.java +++ b/src/com/android/gallery3d/app/PhotoPage.java @@ -507,14 +507,18 @@ public class PhotoPage extends ActivityState implements } public boolean canDisplayBottomControls() { - return mShowBars && !mPhotoView.getFilmMode(); + return mIsActive && !mPhotoView.getFilmMode(); } public boolean canDisplayBottomControl(int control) { if (mCurrentPhoto == null) return false; switch(control) { case R.id.photopage_bottom_control_edit: - return mCurrentPhoto.getMediaType() == MediaObject.MEDIA_TYPE_IMAGE; + return mHaveImageEditor && mShowBars + && (mCurrentPhoto.getSupportedOperations() + & MediaItem.SUPPORT_EDIT) != 0 + && mCurrentPhoto.getMediaType() + == MediaObject.MEDIA_TYPE_IMAGE; case R.id.photopage_bottom_control_panorama: return (mCurrentPhoto.getSupportedOperations() & MediaItem.SUPPORT_PANORAMA) != 0; @@ -1189,6 +1193,10 @@ public class PhotoPage extends ActivityState implements } mPhotoView.pause(); mHandler.removeMessages(MSG_HIDE_BARS); + mHandler.removeMessages(MSG_REFRESH_BOTTOM_CONTROLS); + if (mBottomControls != null) { + mBottomControls.refresh(); + } mActionBar.removeOnMenuVisibilityListener(mMenuVisibilityListener); if (mShowSpinner) { mActionBar.disableAlbumModeMenu(true); @@ -1275,6 +1283,9 @@ public class PhotoPage extends ActivityState implements mActionBar.setDisplayOptions( ((mSecureAlbum == null) && (mSetPathString != null)), false); mActionBar.addOnMenuVisibilityListener(mMenuVisibilityListener); + if (mBottomControls != null) { + mBottomControls.refresh(); + } if (mShowSpinner) { mActionBar.enableAlbumModeMenu( GalleryActionBar.ALBUM_FILMSTRIP_MODE_SELECTED, this); |
