Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cf550678 authored by Philip P. Moltmann's avatar Philip P. Moltmann
Browse files

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 a87968d4)
parent 2efeb427
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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