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

Commit dfc27c61 authored by Todd Kennedy's avatar Todd Kennedy
Browse files

Add action to launch intent

Change-Id: Ief861ed349b99619d0458eb7ce1b9edd6679a860
Fixes: 38350785
Test: cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.EphemeralTest
parent 9e6ef496
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -533,11 +533,12 @@ class ActivityStarter {
                    auxiliaryResponse, originalIntent, resolvedType, callingPackage,
                    verificationBundle, userId);
        }
        return InstantAppResolver.buildEphemeralInstallerIntent(originalIntent,
        return InstantAppResolver.buildEphemeralInstallerIntent(
                Intent.ACTION_INSTALL_INSTANT_APP_PACKAGE, originalIntent,
                auxiliaryResponse.failureIntent, callingPackage, verificationBundle,
            resolvedType, userId, auxiliaryResponse.packageName,
            auxiliaryResponse.splitName, auxiliaryResponse.versionCode,
            auxiliaryResponse.token, auxiliaryResponse.needsPhaseTwo);
                resolvedType, userId, auxiliaryResponse.packageName, auxiliaryResponse.splitName,
                auxiliaryResponse.versionCode, auxiliaryResponse.token,
                auxiliaryResponse.needsPhaseTwo);
    }

    void postStartActivityProcessing(
+3 −1
Original line number Diff line number Diff line
@@ -182,6 +182,7 @@ public abstract class InstantAppResolver {
                    failureIntent = null;
                }
                final Intent installerIntent = buildEphemeralInstallerIntent(
                        Intent.ACTION_RESOLVE_INSTANT_APP_PACKAGE,
                        requestObj.origIntent,
                        failureIntent,
                        requestObj.callingPackage,
@@ -226,6 +227,7 @@ public abstract class InstantAppResolver {
     * Builds and returns an intent to launch the instant installer.
     */
    public static Intent buildEphemeralInstallerIntent(
            @NonNull String action,
            @NonNull Intent origIntent,
            @NonNull Intent failureIntent,
            @NonNull String callingPackage,
@@ -239,7 +241,7 @@ public abstract class InstantAppResolver {
            boolean needsPhaseTwo) {
        // Construct the intent that launches the instant installer
        int flags = origIntent.getFlags();
        final Intent intent = new Intent();
        final Intent intent = new Intent(action);
        intent.setFlags(flags
                | Intent.FLAG_ACTIVITY_NEW_TASK
                | Intent.FLAG_ACTIVITY_CLEAR_TASK