Searched refs:cards (Results 1 – 25 of 26) sorted by relevance
12
158 List<ContextualCard> sortCards(List<ContextualCard> cards) { in sortCards() argument160 return cards.stream() in sortCards()211 public void onFinishCardLoading(List<ContextualCard> cards) { in onFinishCardLoading() argument215 final List<ContextualCard> cardsToKeep = getCardsToKeep(cards); in onFinishCardLoading()232 onContextualCardUpdated(cards.stream() in onFinishCardLoading()236 ContextualCardLogUtils.buildCardListLog(cards)); in onFinishCardLoading()254 final ArrayList<String> cards = mContextualCards.stream() in onSaveInstanceState() local258 outState.putStringArrayList(KEY_CONTEXTUAL_CARDS, cards); in onSaveInstanceState()263 final List<ContextualCard> cards = new ArrayList<>(mContextualCards); in onWindowFocusChanged() local265 for (ContextualCard card : cards) { in onWindowFocusChanged()[all …]
159 final List<ContextualCard> cards = new ArrayList<>(); in filterEligibleCards() local172 cards.add(card); in filterEligibleCards()178 return cards; in filterEligibleCards()
87 final ContextualCardList cards = ContextualCardList.newBuilder() in getContextualCards() local98 return cards; in getContextualCards()
119 public void onContextualCardUpdated(Map<Integer, List<ContextualCard>> cards) { in onContextualCardUpdated() argument120 final List<ContextualCard> contextualCards = cards.get(ContextualCard.CardType.DEFAULT); in onContextualCardUpdated()
37 void onContextualCardUpdated(Map<Integer, List<ContextualCard>> cards); in onContextualCardUpdated() argument
150 List<ContextualCard> sortCards(List<ContextualCard> cards) { in sortCards() argument152 return cards.stream() in sortCards()203 public void onFinishCardLoading(List<ContextualCard> cards) { in onFinishCardLoading() argument207 final List<ContextualCard> cardsToKeep = getCardsToKeep(cards); in onFinishCardLoading()220 onContextualCardUpdated(cards.stream() in onFinishCardLoading()241 final ArrayList<String> cards = mContextualCards.stream() in onSaveInstanceState() local245 outState.putStringArrayList(KEY_CONTEXTUAL_CARDS, cards); in onSaveInstanceState()250 final List<ContextualCard> cards = new ArrayList<>(mContextualCards); in onWindowFocusChanged() local251 for (ContextualCard card : cards) { in onWindowFocusChanged()272 List<ContextualCard> getCardsWithViewType(List<ContextualCard> cards) { in getCardsWithViewType() argument[all …]
189 final List<ContextualCard> cards = new ArrayList<>(); in filterEligibleCards() local202 cards.add(card); in filterEligibleCards()208 return cards; in filterEligibleCards()211 private int getNumberOfLargeCard(List<ContextualCard> cards) { in getNumberOfLargeCard() argument212 return (int) cards.stream() in getNumberOfLargeCard()
64 final ContextualCardList cards = ContextualCardList.newBuilder() in getContextualCards() local72 return cards; in getContextualCards()
121 public void onContextualCardUpdated(Map<Integer, List<ContextualCard>> cards) { in onContextualCardUpdated() argument122 final List<ContextualCard> contextualCards = cards.get(ContextualCard.CardType.DEFAULT); in onContextualCardUpdated()
166 byte[] serialize(List<ContextualCard> cards) { in serialize() argument168 cards.stream().forEach(card -> builder.addCard( in serialize()
102 final ArrayList<String> cards = getContextualCardList().stream() in constructor_hasSavedInstanceState_shouldContainExpectedSavedCards() local105 outState.putStringArrayList(KEY_CONTEXTUAL_CARDS, cards); in constructor_hasSavedInstanceState_shouldContainExpectedSavedCards()140 final List<ContextualCard> cards = new ArrayList<>(); in sortCards_shouldBeDescendingOrder() local145 cards.add(card1); in sortCards_shouldBeDescendingOrder()146 cards.add(card2); in sortCards_shouldBeDescendingOrder()148 final List<ContextualCard> sortedCards = mManager.sortCards(cards); in sortCards_shouldBeDescendingOrder()155 final List<ContextualCard> cards = new ArrayList<>(); in sortCards_hasConditionalAndSliceCards_conditionalShouldAlwaysBeTheLast() local156 cards.add(new ConditionalContextualCard.Builder().build()); in sortCards_hasConditionalAndSliceCards_conditionalShouldAlwaysBeTheLast()157 cards.add(buildContextualCard(TEST_SLICE_URI)); in sortCards_hasConditionalAndSliceCards_conditionalShouldAlwaysBeTheLast()159 final List<ContextualCard> sortedCards = mManager.sortCards(cards); in sortCards_hasConditionalAndSliceCards_conditionalShouldAlwaysBeTheLast()[all …]
73 final List<ContextualCard> cards = getContextualCardList().stream().limit(2) in getDisplayableCards_twoEligibleCards_shouldShowAll() local75 doReturn(cards).when(mContextualCardLoader).filterEligibleCards(anyList()); in getDisplayableCards_twoEligibleCards_shouldShowAll()77 final List<ContextualCard> result = mContextualCardLoader.getDisplayableCards(cards); in getDisplayableCards_twoEligibleCards_shouldShowAll()79 assertThat(result).hasSize(cards.size()); in getDisplayableCards_twoEligibleCards_shouldShowAll()114 final List<ContextualCard> cards = new ArrayList<>(); in getContextualCardList() local115 cards.add(new ContextualCard.Builder() in getContextualCardList()120 cards.add(new ContextualCard.Builder() in getContextualCardList()126 cards.add(new ContextualCard.Builder() in getContextualCardList()131 cards.add(new ContextualCard.Builder() in getContextualCardList()137 return cards; in getContextualCardList()
85 final List<ContextualCard> cards = getContextualCardList(); in getItemCount_cardList_shouldReturnListSize() local86 mAdapter.mContextualCards.addAll(cards); in getItemCount_cardList_shouldReturnListSize()90 assertThat(count).isEqualTo(cards.size()); in getItemCount_cardList_shouldReturnListSize()154 final List<ContextualCard> cards = new ArrayList<>(); in getContextualCardList() local155 cards.add(new ContextualCard.Builder() in getContextualCardList()161 cards.add(new ContextualCard.Builder() in getContextualCardList()167 return cards; in getContextualCardList()
97 final List<ContextualCard> cards = new ArrayList<>(); in getContextualCards_shouldSortByScore() local99 cards.add(new ContextualCard(cursor)); in getContextualCards_shouldSortByScore()101 assertThat(cards.get(0).getName()).isEqualTo("card3"); in getContextualCards_shouldSortByScore()102 assertThat(cards.get(1).getName()).isEqualTo("card1"); in getContextualCards_shouldSortByScore()103 assertThat(cards.get(2).getName()).isEqualTo("card2"); in getContextualCards_shouldSortByScore()
66 final ContextualCardList cards = in contentProviderCall_returnCorrectSize() local69 assertThat(cards.getCardCount()).isEqualTo(actualNo); in contentProviderCall_returnCorrectSize()74 final ContextualCardList cards = mProvider.getContextualCards(); in getContextualCards_wifiSlice_shouldGetImportantCategory() local76 for (ContextualCard card : cards.getCardList()) { in getContextualCards_wifiSlice_shouldGetImportantCategory()
59 final List<ContextualCard> cards = new ArrayList<>(); in filterEligibleCards_twoInvalidCards_shouldReturnOneCard() local60 cards.add(getContextualCard(Uri.parse(sliceUri1))); in filterEligibleCards_twoInvalidCards_shouldReturnOneCard()61 cards.add(getContextualCard(Uri.parse(sliceUri2))); in filterEligibleCards_twoInvalidCards_shouldReturnOneCard()62 cards.add(getContextualCard(Uri.parse(sliceUri3))); in filterEligibleCards_twoInvalidCards_shouldReturnOneCard()64 final List<ContextualCard> result = mContextualCardLoader.filterEligibleCards(cards); in filterEligibleCards_twoInvalidCards_shouldReturnOneCard()
60 final List<ContextualCard> cards = new ArrayList<>(); in getDisplayableCards() local73 cards.add(card); in getDisplayableCards()79 return cards; in getDisplayableCards()
63 final List<ContextualCard> cards = new ArrayList<>(); in getDisplayableCards() local76 cards.add(card); in getDisplayableCards()82 return cards; in getDisplayableCards()
136 final List<ContextualCard> cards = new ArrayList<>(); in loadSuggestions() local152 cards.add(cardBuilder.build()); in loadSuggestions()158 suggestionCards.put(ContextualCard.CardType.LEGACY_SUGGESTION, cards); in loadSuggestions()
143 final List<ContextualCard> cards = new ArrayList<>(); in loadSuggestions() local160 cards.add(cardBuilder.build()); in loadSuggestions()165 mSuggestions.addAll(cards); in loadSuggestions()
216 public static String buildCardListLog(List<ContextualCard> cards) { in buildCardListLog() argument218 log.append(cards.size()); in buildCardListLog()219 for (ContextualCard card : cards) { in buildCardListLog()
1dictionary=main:en_gb,locale=en_GB,description=English (UK),date ...
1dictionary=main:en_us,locale=en_US,description=English (US),date ...