diff options
| author | 2023-01-11 18:06:50 +0000 | |
|---|---|---|
| committer | 2023-01-11 18:06:50 +0000 | |
| commit | 005d819fef4da9922a7f70f18c4689d85bfddcd8 (patch) | |
| tree | 3c0cbdcb051847c34bf62295f019c8653f11a317 | |
| parent | bac13cfa5673d44252d3d836bbe806e61b6322e4 (diff) | |
| parent | f7bbf68f083758e0dca188ef91d7bdaebd9a9aba (diff) | |
Merge "Make mutable PendingIntent explicit"
2 files changed, 8 insertions, 3 deletions
diff --git a/services/tests/servicestests/src/com/android/server/accessibility/AccessibilityManagerServiceTest.java b/services/tests/servicestests/src/com/android/server/accessibility/AccessibilityManagerServiceTest.java index d056348318a5..faa7ee022b54 100644 --- a/services/tests/servicestests/src/com/android/server/accessibility/AccessibilityManagerServiceTest.java +++ b/services/tests/servicestests/src/com/android/server/accessibility/AccessibilityManagerServiceTest.java @@ -106,7 +106,8 @@ public class AccessibilityManagerServiceTest { private static final String INTENT_ACTION = "TESTACTION"; private static final String DESCRIPTION = "description"; private static final PendingIntent TEST_PENDING_INTENT = PendingIntent.getBroadcast( - ApplicationProvider.getApplicationContext(), 0, new Intent(INTENT_ACTION), + ApplicationProvider.getApplicationContext(), 0, new Intent(INTENT_ACTION) + .setPackage(ApplicationProvider.getApplicationContext().getPackageName()), PendingIntent.FLAG_MUTABLE_UNAUDITED); private static final RemoteAction TEST_ACTION = new RemoteAction( Icon.createWithContentUri("content://test"), diff --git a/services/tests/servicestests/src/com/android/server/accessibility/SystemActionPerformerTest.java b/services/tests/servicestests/src/com/android/server/accessibility/SystemActionPerformerTest.java index bbcf77bf15d7..13d93cbbfde4 100644 --- a/services/tests/servicestests/src/com/android/server/accessibility/SystemActionPerformerTest.java +++ b/services/tests/servicestests/src/com/android/server/accessibility/SystemActionPerformerTest.java @@ -76,14 +76,18 @@ public class SystemActionPerformerTest { private static final String DESCRIPTION1 = "description1"; private static final String DESCRIPTION2 = "description2"; private static final PendingIntent TEST_PENDING_INTENT_1 = PendingIntent.getBroadcast( - InstrumentationRegistry.getTargetContext(), 0, new Intent(INTENT_ACTION1), PendingIntent.FLAG_MUTABLE_UNAUDITED); + InstrumentationRegistry.getTargetContext(), 0, new Intent(INTENT_ACTION1) + .setPackage(InstrumentationRegistry.getTargetContext().getPackageName()), + PendingIntent.FLAG_MUTABLE_UNAUDITED); private static final RemoteAction NEW_TEST_ACTION_1 = new RemoteAction( Icon.createWithContentUri("content://test"), LABEL_1, DESCRIPTION1, TEST_PENDING_INTENT_1); private static final PendingIntent TEST_PENDING_INTENT_2 = PendingIntent.getBroadcast( - InstrumentationRegistry.getTargetContext(), 0, new Intent(INTENT_ACTION2), PendingIntent.FLAG_MUTABLE_UNAUDITED); + InstrumentationRegistry.getTargetContext(), 0, new Intent(INTENT_ACTION2) + .setPackage(InstrumentationRegistry.getTargetContext().getPackageName()), + PendingIntent.FLAG_MUTABLE_UNAUDITED); private static final RemoteAction NEW_TEST_ACTION_2 = new RemoteAction( Icon.createWithContentUri("content://test"), LABEL_2, |