From 8f3aa5f6cb9f6c2d829de6224e9ce50edfe0c23e Mon Sep 17 00:00:00 2001 From: Chao Zhang Date: Fri, 25 Mar 2016 16:52:41 +0800 Subject: Gallery2: enhance performance of update supported operation. getSelectedMediaObjects() in updateSupportedOperation() is low performance if there are lots of photos, so menu options will not in correct state immediately, then crash occurred if click menu option. Use mSelectionManager.getSelectedCount() before getSelectedMediaObjects() to disable menu options and share items if need. Change-Id: I937a219ed294151c464f1d7b6ba2e526eef00c82 CRs-Fixed: 985315 --- res/menu/operation.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'res') diff --git a/res/menu/operation.xml b/res/menu/operation.xml index 2403f09fc..2429c48b9 100644 --- a/res/menu/operation.xml +++ b/res/menu/operation.xml @@ -33,7 +33,7 @@ android:icon="@drawable/multiselect_share" android:title="@string/share" android:visible="false" - android:showAsAction="never"> + android:showAsAction="ifRoom">