Implement new dismissal behaviour of contextual card
Currently, if a contextual card gets dismissed, it will be gone forever. After this change, all cards being dismissed can be shown again after a certain amount of time(e.g one day). In order to calculate the amount of time, CARD_DISMISSED column is replaced with DISMISSED_TIMESTAMP. Once a card gets dismissed, a timestamp will be recorded for a corresponding card. In this change, some methods are moved from CardDatabaseHelper to ContextualCardFeatureProvider. So OEMs could replace the providers with their own ones to get cards and have different dismissal behaviours. Bug: 143055685 Test: rototests Change-Id: I00ace98991cabcbfcae4fc47a44e9448683d680c
This commit is contained in:
@@ -66,7 +66,6 @@ public class FakeFeatureFactory extends FeatureFactory {
|
||||
public final UserFeatureProvider userFeatureProvider;
|
||||
public final AssistGestureFeatureProvider assistGestureFeatureProvider;
|
||||
public final AccountFeatureProvider mAccountFeatureProvider;
|
||||
public final ContextualCardFeatureProvider mContextualCardFeatureProvider;
|
||||
public final BluetoothFeatureProvider mBluetoothFeatureProvider;
|
||||
public final AwareFeatureProvider mAwareFeatureProvider;
|
||||
public final FaceFeatureProvider mFaceFeatureProvider;
|
||||
@@ -74,6 +73,7 @@ public class FakeFeatureFactory extends FeatureFactory {
|
||||
public PanelFeatureProvider panelFeatureProvider;
|
||||
public SlicesFeatureProvider slicesFeatureProvider;
|
||||
public SearchFeatureProvider searchFeatureProvider;
|
||||
public ContextualCardFeatureProvider mContextualCardFeatureProvider;
|
||||
|
||||
/**
|
||||
* Call this in {@code @Before} method of the test class to use fake factory.
|
||||
|
Reference in New Issue
Block a user