Check action mode is still valid.
Due to support library bug, onActionItemClicked can be called after finish/onDestroyActionMode so we can check for that by checking if our reference to the action mode is still valid. Fixes #8891
This commit is contained in:
parent
c089d6cd43
commit
0f3de6c979
1 changed files with 2 additions and 0 deletions
|
@ -1054,6 +1054,8 @@ public class ConversationFragment extends Fragment
|
|||
|
||||
@Override
|
||||
public boolean onActionItemClicked(ActionMode mode, MenuItem item) {
|
||||
if (actionMode == null) return false;
|
||||
|
||||
switch(item.getItemId()) {
|
||||
case R.id.menu_context_copy:
|
||||
handleCopyMessage(getListAdapter().getSelectedItems());
|
||||
|
|
Loading…
Add table
Reference in a new issue