Merge "NotificationListenerServiceTest: Mark unaudited PendingIntents with FLAG_MUTABLE_UNAUDITED"
This commit is contained in:
committed by
Android (Google) Code Review
commit
3b255d1c80
@@ -357,11 +357,13 @@ public class NotificationListenerServiceTest extends UiServiceTestCase {
|
||||
private ArrayList<Notification.Action> getSmartActions(String key, int index) {
|
||||
ArrayList<Notification.Action> actions = new ArrayList<>();
|
||||
for (int i = 0; i < index; i++) {
|
||||
// TODO(b/174935955) Please replace FLAG_MUTABLE_UNAUDITED below
|
||||
// with either FLAG_IMMUTABLE (recommended) or FLAG_MUTABLE.
|
||||
PendingIntent intent = PendingIntent.getBroadcast(
|
||||
getContext(),
|
||||
index /*requestCode*/,
|
||||
new Intent("ACTION_" + key),
|
||||
0 /*flags*/);
|
||||
PendingIntent.FLAG_MUTABLE_UNAUDITED /*flags*/);
|
||||
actions.add(new Notification.Action.Builder(null /*icon*/, key, intent).build());
|
||||
}
|
||||
return actions;
|
||||
|
||||
Reference in New Issue
Block a user