Merge "Add unaudited exported flag to exposed runtime receivers"

This commit is contained in:
TreeHugger Robot
2022-11-04 13:03:45 +00:00
committed by Android (Google) Code Review
2 changed files with 7 additions and 4 deletions

View File

@@ -204,7 +204,8 @@ public abstract class AbstractLauncherUiTest {
};
mTargetContext.registerReceiver(broadcastReceiver,
PackageManagerHelper.getPackageFilter(pkg,
Intent.ACTION_PACKAGE_RESTARTED, Intent.ACTION_PACKAGE_DATA_CLEARED));
Intent.ACTION_PACKAGE_RESTARTED, Intent.ACTION_PACKAGE_DATA_CLEARED),
Context.RECEIVER_EXPORTED/*UNAUDITED*/);
mDevice.executeShellCommand("pm clear " + pkg);
assertTrue(pkg + " didn't restart", count.await(10, TimeUnit.SECONDS));
@@ -439,7 +440,8 @@ public abstract class AbstractLauncherUiTest {
private Intent mIntent;
public BlockingBroadcastReceiver(String action) {
mTargetContext.registerReceiver(this, new IntentFilter(action));
mTargetContext.registerReceiver(this, new IntentFilter(action),
Context.RECEIVER_EXPORTED/*UNAUDITED*/);
}
@Override