Fix up bubble images from experimental bubbles
* If we're using the small icon make sure to tint it
* If there's a person try to use the icon from message style layout, this
requires us to add the bubble after the notification has been inflated by
changing onPendingEntryAdded to onNotificationAdded, this should
be fine for bubbles / no big difference between these.
Bug: 146233974
Test: atest BubbleControllerTest
Test: manual:
1) create bubble from telegram user without an image
=> observe that the image looks like what's in the notification
2) create bubble from snapchat
=> observe that the small notification icon is used & tinted
Change-Id: I67c70619824912b2cbcbcb21df6cd219cc8796c0
diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java
index b562243..8e992fe 100644
--- a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java
+++ b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java
@@ -103,7 +103,6 @@
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
-import java.util.List;
import java.util.function.Consumer;
import javax.inject.Inject;
@@ -725,7 +724,7 @@
@SuppressWarnings("FieldCanBeLocal")
private final NotificationEntryListener mEntryListener = new NotificationEntryListener() {
@Override
- public void onPendingEntryAdded(NotificationEntry entry) {
+ public void onNotificationAdded(NotificationEntry entry) {
boolean previouslyUserCreated = mUserCreatedBubbles.contains(entry.getKey());
boolean wasAdjusted = BubbleExperimentConfig.adjustForExperiments(
mContext, entry, previouslyUserCreated);