Further interruptiveness changes
- Compare strings instead of CharSequences in actions
- Ignore changes to remote input choices
- Ignore updates to summaries
Test: runtest systemui-notification
Change-Id: I33a29ee85d93658b2c7217a4ef3b300c9bd2850c
Fixes: 78643290
diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java
index 8d56c3e..1ea93a4 100644
--- a/core/java/android/app/Notification.java
+++ b/core/java/android/app/Notification.java
@@ -2676,7 +2676,8 @@
return true;
}
for (int i = 0; i < firstAs.length; i++) {
- if (!Objects.equals(firstAs[i].title, secondAs[i].title)) {
+ if (!Objects.equals(String.valueOf(firstAs[i].title),
+ String.valueOf(secondAs[i].title))) {
return true;
}
RemoteInput[] firstRs = firstAs[i].getRemoteInputs();
@@ -2691,25 +2692,10 @@
return true;
}
for (int j = 0; j < firstRs.length; j++) {
- if (!Objects.equals(firstRs[j].getLabel(), secondRs[j].getLabel())) {
+ if (!Objects.equals(String.valueOf(firstRs[j].getLabel()),
+ String.valueOf(secondRs[j].getLabel()))) {
return true;
}
- CharSequence[] firstCs = firstRs[j].getChoices();
- CharSequence[] secondCs = secondRs[j].getChoices();
- if (firstCs == null) {
- firstCs = new CharSequence[0];
- }
- if (secondCs == null) {
- secondCs = new CharSequence[0];
- }
- if (firstCs.length != secondCs.length) {
- return true;
- }
- for (int k = 0; k < firstCs.length; k++) {
- if (!Objects.equals(firstCs[k], secondCs[k])) {
- return true;
- }
- }
}
}
}