Merge "Make mutable PendingIntent explicit" into tm-qpr-dev

This commit is contained in:
Christophe Pinelli
2023-01-12 18:15:31 +00:00
committed by Android (Google) Code Review
2 changed files with 4 additions and 2 deletions

View File

@@ -46,7 +46,8 @@ public class DigitalWellBeingToastTest extends AbstractQuickStepTest {
runWithShellPermission(() ->
usageStatsManager.registerAppUsageLimitObserver(observerId, packages,
Duration.ofSeconds(600), Duration.ofSeconds(300),
PendingIntent.getActivity(mTargetContext, -1, new Intent(),
PendingIntent.getActivity(mTargetContext, -1, new Intent()
.setPackage(mTargetContext.getPackageName()),
PendingIntent.FLAG_MUTABLE)));
mLauncher.goHome();

View File

@@ -147,7 +147,8 @@ public class RequestPinItemTest extends AbstractLauncherUiTest {
// Set callback
PendingIntent callback = PendingIntent.getBroadcast(mTargetContext, 0,
new Intent(mCallbackAction), FLAG_ONE_SHOT | FLAG_MUTABLE);
new Intent(mCallbackAction).setPackage(mTargetContext.getPackageName()),
FLAG_ONE_SHOT | FLAG_MUTABLE);
mTargetContext.sendBroadcast(RequestPinItemActivity.getCommandIntent(
RequestPinItemActivity.class, "setCallback").putExtra(
RequestPinItemActivity.EXTRA_PARAM + "0", callback));