Fix incorrect placement of HUN icon in statusbar
Flag: ACONFIG com.android.systemui.notifications_icon_container_refactor
DEVELOPMENT
Bug: 278765923
Fixes: 307904590
Test: manual
1. Receive a heads up notification
2. Verify icon and text appear correctly in the status bar, without
overlap
Change-Id: I557f43c3a9c7dab965a2c1f3f0e5f6139da14fb0
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/LegacyNotificationIconAreaControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/LegacyNotificationIconAreaControllerImpl.java
index dd32434..649a4ac 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/LegacyNotificationIconAreaControllerImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/LegacyNotificationIconAreaControllerImpl.java
@@ -512,7 +512,7 @@
}
public void showIconIsolated(StatusBarIconView icon, boolean animated) {
- mNotificationIcons.showIconIsolated(icon, animated);
+ mNotificationIcons.showIconIsolatedLegacy(icon, animated);
}
public void setIsolatedIconLocation(@NotNull Rect iconDrawingRect, boolean requireStateUpdate) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationIconContainer.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationIconContainer.java
index efb8e2c..75a697f 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationIconContainer.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationIconContainer.java
@@ -701,13 +701,13 @@
}
@Deprecated
- public void showIconIsolated(StatusBarIconView icon, boolean animated) {
+ public void showIconIsolatedLegacy(StatusBarIconView icon, boolean animated) {
NotificationIconContainerRefactor.assertInLegacyMode();
if (animated) {
- showIconIsolatedAnimated(icon, null);
- } else {
- showIconIsolated(icon);
+ mIsolatedIconForAnimation = icon != null ? icon : mIsolatedIcon;
}
+ mIsolatedIcon = icon;
+ updateState();
}
public void showIconIsolatedAnimated(StatusBarIconView icon,