Fixing a bug in suggestion logging and adding more tests.
Test: RunSettingsRoboTests Fixes: b/35802845 Change-Id: I216b3ff344ccdffd038d924649109483e80f5437
This commit is contained in:
@@ -406,7 +406,8 @@ public class DashboardAdapter extends RecyclerView.Adapter<DashboardAdapter.Dash
|
||||
popup.show();
|
||||
}
|
||||
|
||||
private void onBindSuggestionHeader(final DashboardItemHolder holder, DashboardData
|
||||
@VisibleForTesting
|
||||
void onBindSuggestionHeader(final DashboardItemHolder holder, DashboardData
|
||||
.SuggestionHeaderData data) {
|
||||
final boolean moreSuggestions = data.hasMoreSuggestions;
|
||||
final int undisplayedSuggestionCount = data.undisplayedSuggestionCount;
|
||||
@@ -436,10 +437,8 @@ public class DashboardAdapter extends RecyclerView.Adapter<DashboardAdapter.Dash
|
||||
final int suggestionMode;
|
||||
if (moreSuggestions) {
|
||||
suggestionMode = DashboardData.SUGGESTION_MODE_EXPANDED;
|
||||
List<Tile> expandedSuggestions = mDashboardData.getSuggestions().subList(
|
||||
DashboardData.DEFAULT_SUGGESTION_COUNT,
|
||||
mDashboardData.getSuggestions().size());
|
||||
for (Tile suggestion : expandedSuggestions) {
|
||||
|
||||
for (Tile suggestion : mDashboardData.getSuggestions()) {
|
||||
String suggestionId =
|
||||
DashboardAdapter.getSuggestionIdentifier(mContext, suggestion);
|
||||
if (!mSuggestionsShownLogged.contains(suggestionId)) {
|
||||
|
Reference in New Issue
Block a user