[Safer intents] Credentials

To avoid implicit intents, make intents launch explicitly.

Bug: 323061508
Test: build
Change-Id: I236b6214e761574c82a81b4a7e068f617eae5e9d
This commit is contained in:
Jason Chiu
2024-03-25 18:02:41 +08:00
parent 67bfb4141f
commit 7f344f53f6
3 changed files with 5 additions and 0 deletions

View File

@@ -139,6 +139,7 @@ public final class CredentialStorage extends FragmentActivity {
}
final Intent installIntent = new Intent(ACTION_INSTALL)
.setPackage(getPackageName())
.setFlags(Intent.FLAG_ACTIVITY_FORWARD_RESULT)
.putExtras(bundle);
startActivityAsUser(installIntent, new UserHandle(dstUserId));