Merge "Fix bug 5312352 - ListView modal multi-select mode bugs"
This commit is contained in:
@@ -2576,13 +2576,11 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
|
|||||||
final int longPressPosition, final long longPressId) {
|
final int longPressPosition, final long longPressId) {
|
||||||
// CHOICE_MODE_MULTIPLE_MODAL takes over long press.
|
// CHOICE_MODE_MULTIPLE_MODAL takes over long press.
|
||||||
if (mChoiceMode == CHOICE_MODE_MULTIPLE_MODAL) {
|
if (mChoiceMode == CHOICE_MODE_MULTIPLE_MODAL) {
|
||||||
if (mChoiceActionMode == null) {
|
if (mChoiceActionMode == null &&
|
||||||
mChoiceActionMode = startActionMode(mMultiChoiceModeCallback);
|
(mChoiceActionMode = startActionMode(mMultiChoiceModeCallback)) != null) {
|
||||||
setItemChecked(longPressPosition, true);
|
setItemChecked(longPressPosition, true);
|
||||||
|
performHapticFeedback(HapticFeedbackConstants.LONG_PRESS);
|
||||||
}
|
}
|
||||||
// TODO Should we select the long pressed item if we were already in
|
|
||||||
// selection mode? (i.e. treat it like an item click?)
|
|
||||||
performHapticFeedback(HapticFeedbackConstants.LONG_PRESS);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user