Displaying too many cards may overwhelm users, so limit
the number of suggestion cards that should be displayed to two.
Fixes: 126213965
Test: robotests
Change-Id: I17c43746f475b31121c5809e0e8c6cf932efb99d
Use ContextualCardLogUtils to serialize contextual card event to
string, and records the string using regular MetricFeatureProvider
logging APIs.
Bug: 124701288
Test: Robolectric, integrating test with SettingsIntelligence
Change-Id: Ie139b4f4b8a2b0f0dcc4bb8df9bdec8f5fd824a6
Add ContextualNotificationChannelSlice to show more clear sub title on
notification slice.
Fixes: 128641319
Test: visual, robotests
Change-Id: I650102f4cde7d8d397c7a501ba9ee76c401ba9db
- Introduce a static long in SliceFeatureProvider that updates once
every "session". A session is when user is in an UI (screen rotation,
going to subpage, etc does not break the continuation of session).
- Use session token in ContextualWifiSlice to determine when to refresh,
instead of relying on WeakHashMap from CustomSliceManager.
WeakHashMap can be cleaned up at any time by gc so it doesn't match
what we want on the UI.
- Also as a side fix, merged CustomSliceManager into
SliceFeatureProvider.
Fixes: 123937830
Test: robo
Change-Id: I199bceceb208b99a32f3f08e624787b5a03e73a9
Add a way to get the timeout limit of contextual card loading from
Settings.Global. If Settings.Global doesn't have the timeout limit, will
use the default timeout limit.
Bug: 124460999
Test: robotests
Change-Id: I2a25570f51013b566914e485d61405f14290d338
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
After making card pre binding work in paralell, the loading time is now
less than 1 second.
Bug: 124366297
Test: robotests
Change-Id: Ib5daececa73ed9e9cf62a18971c6042d9150aad7
Slice binding takes up sometime which may cause latency.
Thus, making it run in parallel instead of sequentially to improve the
performance and avoid hitting the timeout problem.
Bug: 124366297
Fixes: 123668403
Test: robotests, unit tests
Change-Id: I5d9fa4605f59e2acef65aadf6fce85df36d8fff1
Calling Slice.bindSlice() directly will cause the exception stating that
slices are not pinned, which sometimes leads to crash. Hence, change the
way we bind slices which handles pinSlice() for us before onBindSlice().
Bug: 120552892
Test: robotests, unit tests
Change-Id: I3e65c6b79876dbee5db6f19387bc6b675f734161
Slice cards in contextual homepage are shown as half card or full card.
We will use Category field of ContextualCard to decide card width.
In this CL, also fixed the problem of not showing full card after a
consecutive suggestion card dismissal.
Bug: 119655434
Bug: 121315057
Test: visual, robotest
Change-Id: I3243b9db21b8f288cab88238b20d7d50a2a20d46
When there is a connected wifi, we now hide the wifi slice card.
However, if we initially shows this card but later wifi is connected
while the card is visible, we keep showing this card to avoid janky
animation. The card will be gone if user nagivates to a different UI and
comes back.
- Create a new slice ContextualWifiSlice for homepage use case, all
special logic for homepage are added here.
- Change reference for WIFI_SLICE to CONTEXTUAL_WIFI_SLICE where make
sense.
Change-Id: Ibd87f88058f357aabef0f7d68a5bf48350d75b06
Fixes: 121040746
Test: robotests
- Add a new field in ContextualCard to store whether this card is a large one
- Set dividers for large cards in renderer
Fixes: 119528161
Fixes: 119641839
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.homepage
Change-Id: I5cb95214789f44ccfd8d9ce2177ca2b84835b7a4
- Intially setting it to 1 second.
- Also changed card appear animation from drop in to fade in. It looks
less janky if we don't animate any size change.
- And some random code cleanup
Change-Id: I6e73bcf98fd9aa1d76ae002b94ab5b068dfecf1e
Fixes: 120916829
Test: robotests
In previous design, we add default card feature for "me Card". But "me
Card" is being built by another team. We have removed related cards from
default card feature in ag/5394464 but battery card. Now, remove it.
Fixes: 119819851
Test: robotests
Change-Id: I445546024c80c227abce649008ec648340577e99
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
In order to make static IA visible in the homepage, we have to limit the
number of cards.
Bug: 118691898
Test: robotest
Change-Id: Iefb8b7e874ec1334e93be2d196b7cb72624b17b0