Remove the specific UX of Deferred Setup card
Bug: 142927894 Test: visual, robotests Change-Id: If93506fb11c6417967fab3d082b19947adef0d61
This commit is contained in:
@@ -17,7 +17,6 @@
|
||||
package com.android.settings.homepage.contextualcards;
|
||||
|
||||
import static com.android.settings.homepage.contextualcards.ContextualCardLoader.CARD_CONTENT_LOADER_ID;
|
||||
import static com.android.settings.intelligence.ContextualCardProto.ContextualCard.Category.DEFERRED_SETUP_VALUE;
|
||||
import static com.android.settings.intelligence.ContextualCardProto.ContextualCard.Category.SUGGESTION_VALUE;
|
||||
|
||||
import static java.util.stream.Collectors.groupingBy;
|
||||
@@ -309,9 +308,7 @@ public class ContextualCardManager implements ContextualCardLoader.CardContentLo
|
||||
if (cards.isEmpty()) {
|
||||
return cards;
|
||||
}
|
||||
|
||||
final List<ContextualCard> result = getCardsWithDeferredSetupViewType(cards);
|
||||
return getCardsWithSuggestionViewType(result);
|
||||
return getCardsWithSuggestionViewType(cards);
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
@@ -341,22 +338,6 @@ public class ContextualCardManager implements ContextualCardLoader.CardContentLo
|
||||
return result;
|
||||
}
|
||||
|
||||
private List<ContextualCard> getCardsWithDeferredSetupViewType(List<ContextualCard> cards) {
|
||||
// Find the deferred setup card and assign it with proper view type.
|
||||
// Reason: The returned card list will mix deferred setup card and other suggestion cards
|
||||
// after device running 1 days.
|
||||
final List<ContextualCard> result = new ArrayList<>(cards);
|
||||
for (int index = 0; index < result.size(); index++) {
|
||||
final ContextualCard card = cards.get(index);
|
||||
if (card.getCategory() == DEFERRED_SETUP_VALUE) {
|
||||
result.set(index, card.mutate().setViewType(
|
||||
SliceContextualCardRenderer.VIEW_TYPE_DEFERRED_SETUP).build());
|
||||
return result;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
List<ContextualCard> getCardsToKeep(List<ContextualCard> cards) {
|
||||
if (mSavedCards != null) {
|
||||
|
Reference in New Issue
Block a user