Do not log Contextual card display when card is dismissed

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
This commit is contained in:
Raff Tsai
2019-02-17 01:22:39 +08:00
parent d5a04e1912
commit 3881e2986c
6 changed files with 53 additions and 13 deletions

View File

@@ -118,7 +118,8 @@ public class SliceContextualCardRenderer implements ContextualCardRenderer, Life
sliceLiveData.observe(mLifecycleOwner, slice -> {
if (slice == null) {
Log.w(TAG, "Slice is null");
mContext.getContentResolver().notifyChange(CardContentProvider.URI, null);
mContext.getContentResolver().notifyChange(CardContentProvider.REFRESH_CARD_URI,
null);
return;
} else {
//TODO(b/120629936): Take this out once blank card issue is fixed.