diff options
author | Ray Chen <raychen@google.com> | 2012-05-03 13:10:51 +0800 |
---|---|---|
committer | Ray Chen <raychen@google.com> | 2012-05-09 09:31:39 +0800 |
commit | e7a49195b7f65237668edbae3b5af1335d0aae66 (patch) | |
tree | c624bc8b0c5abea52dcff0e969ea258b4e3ad981 /src/com/android/gallery3d/ui/ActionModeHandler.java | |
parent | ac02f46aa7ec727b839affb9aee415f01c1c2193 (diff) | |
download | android_packages_apps_Snap-e7a49195b7f65237668edbae3b5af1335d0aae66.tar.gz android_packages_apps_Snap-e7a49195b7f65237668edbae3b5af1335d0aae66.tar.bz2 android_packages_apps_Snap-e7a49195b7f65237668edbae3b5af1335d0aae66.zip |
Fix 6360834 Select All is shown in place of Deselect all option
The CL changes the SelectionManager's toggle method so it changes itself to
inverse selection mode when all items are already selected, and onSelectionModeChange
will be triggered so the listener can update the selection menu (Select all/Deselect all)
and ActionBar.
Change-Id: I570a299cc8fd7d1d5acab948f9c6531a9adde486
b: 6360834
Diffstat (limited to 'src/com/android/gallery3d/ui/ActionModeHandler.java')
-rw-r--r-- | src/com/android/gallery3d/ui/ActionModeHandler.java | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/com/android/gallery3d/ui/ActionModeHandler.java b/src/com/android/gallery3d/ui/ActionModeHandler.java index d8e60d3a2..786fd27f7 100644 --- a/src/com/android/gallery3d/ui/ActionModeHandler.java +++ b/src/com/android/gallery3d/ui/ActionModeHandler.java @@ -133,10 +133,6 @@ public class ActionModeHandler implements ActionMode.Callback { needsConfirm = true; } mMenuExecutor.onMenuClicked(item, needsConfirm, listener); - if (action == R.id.action_select_all) { - updateSupportedOperation(); - updateSelectionMenu(); - } } finally { root.unlockRenderThread(); } @@ -282,6 +278,8 @@ public class ActionModeHandler implements ActionMode.Callback { mMenuTask.cancel(); } + updateSelectionMenu(); + // Disable share action until share intent is in good shape final MenuItem item = mShareActionProvider != null ? mMenu.findItem(R.id.action_share) : null; |