Rename updateNotification param to shouldHeadsUpAgain
Bug: 320753095
Test: SystemUITests
Change-Id: I78fe9f19e05d139953102fefa0bdf707d3d65c3b
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/HeadsUpCoordinator.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/HeadsUpCoordinator.kt
index 46806e6..54b6ad7 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/HeadsUpCoordinator.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/HeadsUpCoordinator.kt
@@ -790,7 +790,7 @@
/** Mutates the HeadsUp state of notifications. */
private interface HunMutator {
- fun updateNotification(key: String, alert: Boolean)
+ fun updateNotification(key: String, shouldHeadsUpAgain: Boolean)
fun removeNotification(key: String, releaseImmediately: Boolean)
}
@@ -801,8 +801,8 @@
private class HunMutatorImpl(private val headsUpManager: HeadsUpManager) : HunMutator {
private val deferred = mutableListOf<Pair<String, Boolean>>()
- override fun updateNotification(key: String, alert: Boolean) {
- headsUpManager.updateNotification(key, alert)
+ override fun updateNotification(key: String, shouldHeadsUpAgain: Boolean) {
+ headsUpManager.updateNotification(key, shouldHeadsUpAgain)
}
override fun removeNotification(key: String, releaseImmediately: Boolean) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/BaseHeadsUpManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/BaseHeadsUpManager.java
index 1528c9b..1414150 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/BaseHeadsUpManager.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/BaseHeadsUpManager.java
@@ -159,7 +159,7 @@
public void showNotification(@NonNull NotificationEntry entry) {
mLogger.logShowNotification(entry);
addEntry(entry);
- updateNotification(entry.getKey(), true /* show */);
+ updateNotification(entry.getKey(), true /* shouldHeadsUpAgain */);
entry.setInterruption();
}
@@ -190,12 +190,12 @@
/**
* Called when the notification state has been updated.
* @param key the key of the entry that was updated
- * @param show whether the notification should show again and force reevaluation of
- * removal time
+ * @param shouldHeadsUpAgain whether the notification should show again and force reevaluation
+ * of removal time
*/
- public void updateNotification(@NonNull String key, boolean show) {
+ public void updateNotification(@NonNull String key, boolean shouldHeadsUpAgain) {
HeadsUpEntry headsUpEntry = mHeadsUpEntryMap.get(key);
- mLogger.logUpdateNotification(key, show, headsUpEntry != null);
+ mLogger.logUpdateNotification(key, shouldHeadsUpAgain, headsUpEntry != null);
if (headsUpEntry == null) {
// the entry was released before this update (i.e by a listener) This can happen
// with the groupmanager
@@ -204,7 +204,7 @@
headsUpEntry.mEntry.sendAccessibilityEvent(AccessibilityEvent.TYPE_WINDOW_CONTENT_CHANGED);
- if (show) {
+ if (shouldHeadsUpAgain) {
headsUpEntry.updateEntry(true /* updatePostTime */, "updateNotification");
if (headsUpEntry != null) {
setEntryPinned(headsUpEntry, shouldHeadsUpBecomePinned(headsUpEntry.mEntry));
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/HeadsUpManager.kt b/packages/SystemUI/src/com/android/systemui/statusbar/policy/HeadsUpManager.kt
index b8c7e20..a7352be 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/HeadsUpManager.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/HeadsUpManager.kt
@@ -182,7 +182,7 @@
*/
fun unpinAll(userUnPinned: Boolean)
- fun updateNotification(key: String, alert: Boolean)
+ fun updateNotification(key: String, shouldHeadsUpAgain: Boolean)
}
/** Sets the animation state of the HeadsUpManager. */