Skip to content

Commit 3752277

Browse files
author
Android Build Coastguard Worker
committed
Merge cherrypicks of ['googleplex-android-review.googlesource.com/23892525'] into security-aosp-tm-release.
Change-Id: Id3701bf5352ac1ccdef741292a9893cdb041b3ec
2 parents 593ee4d + 20aedba commit 3752277

2 files changed

Lines changed: 0 additions & 22 deletions

File tree

core/java/android/app/Notification.java

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2857,17 +2857,6 @@ public void visitUris(@NonNull Consumer<Uri> visitor) {
28572857
if (person != null) {
28582858
visitor.accept(person.getIconUri());
28592859
}
2860-
2861-
final RemoteInputHistoryItem[] history = (RemoteInputHistoryItem[])
2862-
extras.getParcelableArray(Notification.EXTRA_REMOTE_INPUT_HISTORY_ITEMS);
2863-
if (history != null) {
2864-
for (int i = 0; i < history.length; i++) {
2865-
RemoteInputHistoryItem item = history[i];
2866-
if (item.getUri() != null) {
2867-
visitor.accept(item.getUri());
2868-
}
2869-
}
2870-
}
28712860
}
28722861

28732862
if (isStyle(MessagingStyle.class) && extras != null) {

services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@
123123
import android.app.PendingIntent;
124124
import android.app.Person;
125125
import android.app.RemoteInput;
126-
import android.app.RemoteInputHistoryItem;
127126
import android.app.StatsManager;
128127
import android.app.admin.DevicePolicyManagerInternal;
129128
import android.app.usage.UsageStatsManagerInternal;
@@ -5182,21 +5181,13 @@ public void testVisitUris() throws Exception {
51825181
.setName("People List Person 2")
51835182
.setIcon(personIcon3)
51845183
.build();
5185-
final Uri historyUri1 = Uri.parse("content://com.example/history1");
5186-
final Uri historyUri2 = Uri.parse("content://com.example/history2");
5187-
final RemoteInputHistoryItem historyItem1 = new RemoteInputHistoryItem(null, historyUri1,
5188-
"a");
5189-
final RemoteInputHistoryItem historyItem2 = new RemoteInputHistoryItem(null, historyUri2,
5190-
"b");
51915184

51925185
Bundle extras = new Bundle();
51935186
extras.putParcelable(Notification.EXTRA_AUDIO_CONTENTS_URI, audioContents);
51945187
extras.putString(Notification.EXTRA_BACKGROUND_IMAGE_URI, backgroundImage.toString());
51955188
extras.putParcelable(Notification.EXTRA_MESSAGING_PERSON, person1);
51965189
extras.putParcelableArrayList(Notification.EXTRA_PEOPLE_LIST,
51975190
new ArrayList<>(Arrays.asList(person2, person3)));
5198-
extras.putParcelableArray(Notification.EXTRA_REMOTE_INPUT_HISTORY_ITEMS,
5199-
new RemoteInputHistoryItem[]{historyItem1, historyItem2});
52005191

52015192
Notification n = new Notification.Builder(mContext, "a")
52025193
.setContentTitle("notification with uris")
@@ -5214,8 +5205,6 @@ public void testVisitUris() throws Exception {
52145205
verify(visitor, times(1)).accept(eq(personIcon1.getUri()));
52155206
verify(visitor, times(1)).accept(eq(personIcon2.getUri()));
52165207
verify(visitor, times(1)).accept(eq(personIcon3.getUri()));
5217-
verify(visitor, times(1)).accept(eq(historyUri1));
5218-
verify(visitor, times(1)).accept(eq(historyUri2));
52195208
}
52205209

52215210
@Test

0 commit comments

Comments
 (0)