Loading suggestions via legacy SuggestionService sometimes

When legacy_suggestion flag is turned on, load Suggestions from
SuggestionService instead of contextual homepage, because contextual
homepage infrastructure might not be availble on all devices.

Bug: 118842099
Test: robo
Change-Id: I91710c005e11be5a9b3dd39ceff670106e7f80c3
This commit is contained in:
Fan Zhang
2018-11-05 15:40:32 -08:00
parent 16c2d70881
commit 2a98c843e8
21 changed files with 675 additions and 36 deletions

View File

@@ -33,12 +33,12 @@ public class ContextualCard {
/**
* Flags indicating the type of the ContextualCard.
*/
@IntDef({CardType.DEFAULT, CardType.SLICE, CardType.SUGGESTION, CardType.CONDITIONAL})
@IntDef({CardType.DEFAULT, CardType.SLICE, CardType.LEGACY_SUGGESTION, CardType.CONDITIONAL})
@Retention(RetentionPolicy.SOURCE)
public @interface CardType {
int DEFAULT = 0;
int SLICE = 1;
int SUGGESTION = 2;
int LEGACY_SUGGESTION = 2;
int CONDITIONAL = 3;
}