Create a new list when building suggestion data.
- using sublist of the original suggestions list may results in ConcurrentModificationException if the originaly list is being modified. Create a new list instead to avoid running into the issue. Change-Id: Ia83a0432be542eeb428d177f6118d26fc2262e93 Fixes: 74194336 Test: run monkey
This commit is contained in:
@@ -155,8 +155,8 @@ public class DashboardAdapter extends RecyclerView.Adapter<DashboardAdapter.Dash
|
||||
// remain as the dashboard item. Need to refresh the dashboard list.
|
||||
setSuggestions(null);
|
||||
} else {
|
||||
mSuggestionAdapter.removeSuggestion(suggestion);
|
||||
notifyItemChanged(0, null);
|
||||
list.remove(suggestion);
|
||||
setSuggestions(list);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user