Each time window focus changes on rotation,
a separate controller is created which further registers a new
receiver each time.
Bug: 173166718
Change-Id: I500a6ae5cf7058364e43baa44b7161c5dcfbc232
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 two control views for conditional card to achieve collapsibility.
One of these control views is a footer that is appended to the last
position when expanding all conditional cards. The other is a header
that is used in the collapsed state of conditional cards.
Bug: 119593268
Bug: 113451905
Test: visual, robotests
Change-Id: I39e79b8925a9e3e4ce80c422bcd0ba889aba5f6a
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 the homepage, we should allow cards to be dismissed.
- Implement card flipping upon card long pressing.
Bug: 113783548
Test: robotests, visual
Change-Id: I2ddb498321ba5c5078d6944aa2ef32f1386bdb10
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
Use layout resource id as the return value of getItemViewType
in the ContextualCardsAdapter to make sure the RecyclerView could
work normally, and adjust the lookup table mechanism to meet the
current design as well.
Bug: 113451905, 112578070
Test: visual, robotest
Change-Id: I8fa299e44025a0b71b6990d020e7f0683c153337