Dismiss suggestion when close button is clicked.

- add handling to the suggestion card to dismiss the suggestion when
the close button is clicked.

Bug: 70573674
Test: make RunSettingsRoboTests
Change-Id: I8155efc326242abde753a633009e2579a9b3aa9b
This commit is contained in:
Doris Ling
2018-01-23 12:08:50 -08:00
parent 35a7f0d642
commit 0e32252111
3 changed files with 14 additions and 12 deletions

View File

@@ -200,7 +200,10 @@ public class SuggestionAdapterV2Test {
mSuggestionAdapter.onBindViewHolder(mSuggestionHolder, 0);
mSuggestionHolder.itemView.findViewById(R.id.close_button).performClick();
verify(callback).onSuggestionClosed(suggestions.get(0));
final Suggestion suggestion = suggestions.get(0);
verify(mFeatureFactory.suggestionsFeatureProvider).dismissSuggestion(
mActivity, mSuggestionControllerMixin, suggestion);
verify(callback).onSuggestionClosed(suggestion);
}
private void setupSuggestions(Context context, List<Suggestion> suggestions) {