Reset dismissal UI to the baseline when exiting the page.

Flip the card back to slice view if users exit the page instead of
getting the dismissal UI preserved. We should also reset the UI to the baseline
if users dismiss a card, so when the view is reused, slice view can
then be displayed correctly.

Change-Id: If5448c57dec44ef5c1d3472358d4ddc9398538b8
Fixes: 119820168
Test: robotests
This commit is contained in:
Yi-Ling Chuang
2018-11-29 18:27:56 +08:00
parent 8df1f9384e
commit 2efa93460c
3 changed files with 95 additions and 25 deletions

View File

@@ -69,9 +69,9 @@ public class SliceContextualCardController implements ContextualCardController {
dbHelper.markContextualCardAsDismissed(mContext, card.getName());
});
showFeedbackDialog(card);
final ContextualCardFeatureProvider contexualCardFeatureProvider =
final ContextualCardFeatureProvider contextualCardFeatureProvider =
FeatureFactory.getFactory(mContext).getContextualCardFeatureProvider();
contexualCardFeatureProvider.logContextualCardDismiss(mContext, card);
contextualCardFeatureProvider.logContextualCardDismiss(mContext, card);
}
@Override