summaryrefslogtreecommitdiff
path: root/apct-tests/perftests
diff options
context:
space:
mode:
authorAshwini Oruganti <ashfall@google.com>2021-01-07 12:04:25 -0800
committerAshwini Oruganti <ashfall@google.com>2021-01-12 15:07:43 -0800
commitf8191e8996452432f6eb979180866dff84240ab7 (patch)
tree63dcc980521abb80117b2fbc201e2f8c336852d4 /apct-tests/perftests
parent41c074582d20e2b33350130c22bb41bd032cf54a (diff)
Bulk apply PendingIntent.FLAG_MUTABLE_UNAUDITED.
We've been working hard to require PendingIntents explicitly declare if they allow their contents to be mutated or not, and to finish landing that work this change applies the new FLAG_MUTABLE_UNAUDITED flag to all remaining code locations until they can be manually inspected. Bug: 160794467 Test: manual Change-Id: I8d7ec64ac89755c14b5959bb6ef0bce203c92bf0
Diffstat (limited to 'apct-tests/perftests')
-rw-r--r--apct-tests/perftests/core/src/android/app/PendingIntentPerfTest.java12
-rw-r--r--apct-tests/perftests/utils/src/android/perftests/utils/TestPackageInstaller.java2
2 files changed, 7 insertions, 7 deletions
diff --git a/apct-tests/perftests/core/src/android/app/PendingIntentPerfTest.java b/apct-tests/perftests/core/src/android/app/PendingIntentPerfTest.java
index a320514dd97a..1bb98cb19965 100644
--- a/apct-tests/perftests/core/src/android/app/PendingIntentPerfTest.java
+++ b/apct-tests/perftests/core/src/android/app/PendingIntentPerfTest.java
@@ -62,7 +62,7 @@ public class PendingIntentPerfTest {
state.resumeTiming();
final PendingIntent pendingIntent = PendingIntent.getActivity(mContext, 0, mIntent,
- 0);
+ PendingIntent.FLAG_MUTABLE_UNAUDITED);
state.pauseTiming();
pendingIntent.cancel();
@@ -80,11 +80,11 @@ public class PendingIntentPerfTest {
while (state.keepRunning()) {
state.pauseTiming();
final PendingIntent previousPendingIntent = PendingIntent.getActivity(mContext, 0,
- mIntent, 0);
+ mIntent, PendingIntent.FLAG_MUTABLE_UNAUDITED);
state.resumeTiming();
final PendingIntent pendingIntent = PendingIntent.getActivity(mContext, 0, mIntent,
- PendingIntent.FLAG_CANCEL_CURRENT);
+ PendingIntent.FLAG_CANCEL_CURRENT | PendingIntent.FLAG_MUTABLE_UNAUDITED);
state.pauseTiming();
pendingIntent.cancel();
@@ -102,11 +102,11 @@ public class PendingIntentPerfTest {
while (state.keepRunning()) {
state.pauseTiming();
final PendingIntent previousPendingIntent = PendingIntent.getActivity(mContext, 0,
- mIntent, 0);
+ mIntent, PendingIntent.FLAG_MUTABLE_UNAUDITED);
state.resumeTiming();
final PendingIntent pendingIntent = PendingIntent.getActivity(mContext, 0, mIntent,
- PendingIntent.FLAG_UPDATE_CURRENT);
+ PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_MUTABLE_UNAUDITED);
state.pauseTiming();
previousPendingIntent.cancel();
@@ -124,7 +124,7 @@ public class PendingIntentPerfTest {
while (state.keepRunning()) {
state.pauseTiming();
final PendingIntent pendingIntent = PendingIntent.getActivity(mContext, 0,
- mIntent, 0);
+ mIntent, PendingIntent.FLAG_MUTABLE_UNAUDITED);
state.resumeTiming();
pendingIntent.cancel();
diff --git a/apct-tests/perftests/utils/src/android/perftests/utils/TestPackageInstaller.java b/apct-tests/perftests/utils/src/android/perftests/utils/TestPackageInstaller.java
index a433d801acaf..530dc9dce1ef 100644
--- a/apct-tests/perftests/utils/src/android/perftests/utils/TestPackageInstaller.java
+++ b/apct-tests/perftests/utils/src/android/perftests/utils/TestPackageInstaller.java
@@ -134,7 +134,7 @@ public class TestPackageInstaller {
Intent intent = new Intent(action);
PendingIntent pending = PendingIntent.getBroadcast(mContext, sessionId, intent,
- PendingIntent.FLAG_UPDATE_CURRENT);
+ PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_MUTABLE_UNAUDITED);
return pending.getIntentSender();
}