Rebuild suggestions when suggestions are dismissed
When suggestions are swiped away, refresh the suggestion categories so that suggestions previously suppressed because it's lower priority or because there is an exclusive suggestion now has a chance to be shown. Test: cd tests/robotests && mma Bug: 36811621 Change-Id: I1a1ae1624c2f69153d95d238b2143ac9273e117d
This commit is contained in:
@@ -24,6 +24,7 @@ import com.android.settings.TestConfig;
|
||||
import com.android.settings.dashboard.conditional.ConditionManager;
|
||||
import com.android.settings.dashboard.conditional.FocusRecyclerView;
|
||||
import com.android.settingslib.drawer.CategoryKey;
|
||||
import com.android.settingslib.drawer.Tile;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
@@ -109,4 +110,11 @@ public class DashboardSummaryTest {
|
||||
mSummary.onCategoriesChanged();
|
||||
verify(mSummary).rebuildUI();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void onSuggestionDismissed_categoryShouldBeRefreshed() {
|
||||
doNothing().when(mSummary).rebuildUI();
|
||||
mSummary.onSuggestionDismissed(mock(Tile.class));
|
||||
verify(mSummary).rebuildUI();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user