Make settings do nothing if ranking for a card is invalid

Fixes: 124386997
Test: robotests
Change-Id: Ib01c75ec0490cdc034255300a09e8099e05fc389
This commit is contained in:
Fan Zhang
2019-03-11 16:17:58 -07:00
parent a51b5f8756
commit 0d093fd1e1
3 changed files with 27 additions and 9 deletions

View File

@@ -51,6 +51,9 @@ public class EligibleCardChecker implements Callable<ContextualCard> {
@VisibleForTesting
boolean isCardEligibleToDisplay(ContextualCard card) {
if (card.getRankingScore() < 0) {
return false;
}
if (card.isCustomCard()) {
return true;
}