diff options
author | kaiyiz <kaiyiz@codeaurora.org> | 2014-04-26 10:27:13 +0800 |
---|---|---|
committer | emancebo <emancebo@cyngn.com> | 2014-09-04 10:40:21 -0700 |
commit | 7ec65796474a6e1b751c59de9125ffc17380cd0e (patch) | |
tree | f427382d8e79afc08e69f8dae719cbc0984fb716 | |
parent | 5a82065edc41372a0a07205a4b4f8247d5cb0595 (diff) | |
download | android_packages_apps_Gallery2-7ec65796474a6e1b751c59de9125ffc17380cd0e.tar.gz android_packages_apps_Gallery2-7ec65796474a6e1b751c59de9125ffc17380cd0e.tar.bz2 android_packages_apps_Gallery2-7ec65796474a6e1b751c59de9125ffc17380cd0e.zip |
Gallery2: Fix menu display inconsistent with its cluster
The operation order is not correct.We should first execute
the change of cluster,then display menu title according to
the cluster.But we do the opposite operation,which cause the
menu will always display last cluster‘s corresponding menu
and cause this bug happened.
Modify the operation order.
CRs-fixed: 619812
Change-Id: I6cd3c82e065cef5a463e06295bf332e1459500e3
-rw-r--r-- | src/com/android/gallery3d/app/AlbumSetPage.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/com/android/gallery3d/app/AlbumSetPage.java b/src/com/android/gallery3d/app/AlbumSetPage.java index ec4462f1d..f3ba62db2 100644 --- a/src/com/android/gallery3d/app/AlbumSetPage.java +++ b/src/com/android/gallery3d/app/AlbumSetPage.java @@ -543,6 +543,13 @@ public class AlbumSetPage extends ActivityState implements inflater.inflate(R.menu.albumset, menu); boolean wasShowingClusterMenu = mShowClusterMenu; mShowClusterMenu = !inAlbum; + if (mShowClusterMenu != wasShowingClusterMenu) { + if (mShowClusterMenu) { + mActionBar.enableClusterMenu(mSelectedAction, this); + } else { + mActionBar.disableClusterMenu(true); + } + } boolean selectAlbums = !inAlbum && mActionBar.getClusterTypeAction() == FilterUtils.CLUSTER_BY_ALBUM; MenuItem selectItem = menu.findItem(R.id.action_select); @@ -562,13 +569,6 @@ public class AlbumSetPage extends ActivityState implements mActionBar.setTitle(mTitle); mActionBar.setSubtitle(mSubtitle); - if (mShowClusterMenu != wasShowingClusterMenu) { - if (mShowClusterMenu) { - mActionBar.enableClusterMenu(mSelectedAction, this); - } else { - mActionBar.disableClusterMenu(true); - } - } } return true; } |