Skip to content

Commit 69f018b

Browse files
Ioana AlexandruAndroid Build Coastguard Worker
authored andcommitted
DO NOT MERGE Revert "Verify URI permissions for EXTRA_REMOTE_INPUT_HISTORY_ITEMS."
This reverts commit 43b1711. Reason for revert: regression reported at b/289223315 Bug: 289223315 Bug: 276729064 (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:f69ded9ec319f753d1464586ee28248b84a2bacd) Merged-In: I101938fbc51592537023345ba1e642827510981b Change-Id: I101938fbc51592537023345ba1e642827510981b
1 parent 2d3bf34 commit 69f018b

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
@@ -2861,17 +2861,6 @@ public void visitUris(@NonNull Consumer<Uri> visitor) {
28612861
if (person != null) {
28622862
visitor.accept(person.getIconUri());
28632863
}
2864-
2865-
final RemoteInputHistoryItem[] history = (RemoteInputHistoryItem[])
2866-
extras.getParcelableArray(Notification.EXTRA_REMOTE_INPUT_HISTORY_ITEMS);
2867-
if (history != null) {
2868-
for (int i = 0; i < history.length; i++) {
2869-
RemoteInputHistoryItem item = history[i];
2870-
if (item.getUri() != null) {
2871-
visitor.accept(item.getUri());
2872-
}
2873-
}
2874-
}
28752864
}
28762865

28772866
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
@@ -129,7 +129,6 @@
129129
import android.app.PendingIntent;
130130
import android.app.Person;
131131
import android.app.RemoteInput;
132-
import android.app.RemoteInputHistoryItem;
133132
import android.app.StatsManager;
134133
import android.app.admin.DevicePolicyManagerInternal;
135134
import android.app.usage.UsageStatsManagerInternal;
@@ -5416,21 +5415,13 @@ public void testVisitUris() throws Exception {
54165415
.setName("People List Person 2")
54175416
.setIcon(personIcon3)
54185417
.build();
5419-
final Uri historyUri1 = Uri.parse("content://com.example/history1");
5420-
final Uri historyUri2 = Uri.parse("content://com.example/history2");
5421-
final RemoteInputHistoryItem historyItem1 = new RemoteInputHistoryItem(null, historyUri1,
5422-
"a");
5423-
final RemoteInputHistoryItem historyItem2 = new RemoteInputHistoryItem(null, historyUri2,
5424-
"b");
54255418

54265419
Bundle extras = new Bundle();
54275420
extras.putParcelable(Notification.EXTRA_AUDIO_CONTENTS_URI, audioContents);
54285421
extras.putString(Notification.EXTRA_BACKGROUND_IMAGE_URI, backgroundImage.toString());
54295422
extras.putParcelable(Notification.EXTRA_MESSAGING_PERSON, person1);
54305423
extras.putParcelableArrayList(Notification.EXTRA_PEOPLE_LIST,
54315424
new ArrayList<>(Arrays.asList(person2, person3)));
5432-
extras.putParcelableArray(Notification.EXTRA_REMOTE_INPUT_HISTORY_ITEMS,
5433-
new RemoteInputHistoryItem[]{historyItem1, historyItem2});
54345425

54355426
Notification n = new Notification.Builder(mContext, "a")
54365427
.setContentTitle("notification with uris")
@@ -5448,8 +5439,6 @@ public void testVisitUris() throws Exception {
54485439
verify(visitor, times(1)).accept(eq(personIcon1.getUri()));
54495440
verify(visitor, times(1)).accept(eq(personIcon2.getUri()));
54505441
verify(visitor, times(1)).accept(eq(personIcon3.getUri()));
5451-
verify(visitor, times(1)).accept(eq(historyUri1));
5452-
verify(visitor, times(1)).accept(eq(historyUri2));
54535442
}
54545443

54555444
@Test

0 commit comments

Comments
 (0)