diff options
author | Philip P. Moltmann <moltmann@google.com> | 2020-11-04 14:53:34 -0800 |
---|---|---|
committer | Philip P. Moltmann <moltmann@google.com> | 2020-11-05 16:31:51 +0000 |
commit | cf550678c56e9ec75e174790df0707cee26e5338 (patch) | |
tree | 0d2d10148889534ad21f084c76a359516c5d5ad7 /packages/PackageInstaller | |
parent | 2efeb4274fba6a4780df928e7d27b3dd9804446d (diff) |
Grant access to the URI when forwarding intent from InstallStart to
InstallInstalling
Otherwise the URI grant might be taken away before InstallInstalling can
open it.
Fixes: 163274739
Test: atest CtsPackageInstallTestCases
Change-Id: Ibd9ffc253358606b8ae2ea41a875fcb1a1efcb2b
(cherry picked from commit a87968d4fb4f100158268d9640b647bc0d7cc4cc)
Diffstat (limited to 'packages/PackageInstaller')
-rw-r--r-- | packages/PackageInstaller/src/com/android/packageinstaller/InstallStart.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/packages/PackageInstaller/src/com/android/packageinstaller/InstallStart.java b/packages/PackageInstaller/src/com/android/packageinstaller/InstallStart.java index 6fbee16e3dae..861a8ef0a910 100644 --- a/packages/PackageInstaller/src/com/android/packageinstaller/InstallStart.java +++ b/packages/PackageInstaller/src/com/android/packageinstaller/InstallStart.java @@ -105,7 +105,8 @@ public class InstallStart extends Activity { } Intent nextActivity = new Intent(intent); - nextActivity.setFlags(Intent.FLAG_ACTIVITY_FORWARD_RESULT); + nextActivity.setFlags(Intent.FLAG_ACTIVITY_FORWARD_RESULT + | Intent.FLAG_GRANT_READ_URI_PERMISSION); // The the installation source as the nextActivity thinks this activity is the source, hence // set the originating UID and sourceInfo explicitly |