Remove some columns from Contextual Card DB as they are never used.
Fixes: 143058171
Test: robotests
Change-Id: Ic618ccba16c3ed9f0a85b905535916e5d062d79e
A card dismissal and scheduled card collection trigger a reload. During
card reloading, we perform slices pre check. The pre check goes through
the whole slice binding process, which means slices will be pinned and unpinned.
Hence, the on screen slices will gets unpinned resulting to the
unresponsive toggling.
As we have DiffCallbck implmented, if the card list are the same, then
bindView in the renderer will be ignored, which means the unpinned slice
will have no chance to re-register slice callback. So here we force it
to rebind the views.
Fixes: 123174237
Test: robotests
Change-Id: Id98bc16632bf024cbb611b40890e4d2629f08d7b
- Only enable swipe for slice full/half card.
- Add isPendingDismiss in ContextualCard to determine if we should show
dismissal view.
- Take out long press feature.
Bug: 126214056
Test: robotests
Change-Id: Ib03e605347b2f50d3c62fcd4f95875a21cc9ef1c
mIsHalfWidth in ContextualCard is too generic to identify its
responsibility, it is used to hold the value of is_support_half from
database and used to decide the card width. Also, it limits the
relationship of CardType-to-Renderer not to be extended to one-to-many.
To deal with this, we replaced mIsHalfWidth with mViewType to implement
one-to-many relationship of CardType-to-Renderer, and removed all
related logic of mIsHalfWidth.
Bug: 121303357
Test: robotests, visual
Change-Id: I03e14392272194424f317d11bf9d0d794a6133f4
- 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
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
- Add half-width and full-width layouts for conditional cards
- Keep origin strings of conditional cards, that could make conditional
cards truncate its title and summary in half-width card.
- Add default value of isHalfWidth to each condition controller.
Bug: 113451905
Test: robotests, visual
Change-Id: Ib0055f32c4ab9e73c0e0a57c6b0ef586d52942e0