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
Remove some columns from Contextual Card DB as they are never used.
Fixes: 143058171
Test: robotests
Change-Id: Ic618ccba16c3ed9f0a85b905535916e5d062d79e
If the db change comes from dismiss card uri. We don't
need to log card display again.
Fixes: 121196921
Test: Robolectric
Change-Id: I4e222187fafa8325e803fa6ee17ebb0b51fb8cb2
When users clcik on the remove button in dismissal view, the card should
be marked as dismissed in the database, and the UI should be refreshed.
Bug: 113783548, 119594116
Test: robotests
Change-Id: I980600c4c0753ad5abc52ae63bac7196a4b818f1
Added card_dismissed field to keep user dismissal behavior and filter it when cards loaded
Bug: 113783548
Test: manual test
Change-Id: I27549eca95c2e49fcc92fa59a5c02da73814a522
SettingsIntelligence should be able to extend support to more categories
without changing Settings.
Bug: 118708391
Test: rebuild
Change-Id: I420394f718bb3712e94040fb3e3c4f66cca629af