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

Commit ed57e460 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Add action to launch intent" into oc-dev

parents 2d885e94 dfc27c61
Loading
Loading
Loading
Loading
+6 −5
Original line number Original line Diff line number Diff line
@@ -533,11 +533,12 @@ class ActivityStarter {
                    auxiliaryResponse, originalIntent, resolvedType, callingPackage,
                    auxiliaryResponse, originalIntent, resolvedType, callingPackage,
                    verificationBundle, userId);
                    verificationBundle, userId);
        }
        }
        return InstantAppResolver.buildEphemeralInstallerIntent(originalIntent,
        return InstantAppResolver.buildEphemeralInstallerIntent(
                Intent.ACTION_INSTALL_INSTANT_APP_PACKAGE, originalIntent,
                auxiliaryResponse.failureIntent, callingPackage, verificationBundle,
                auxiliaryResponse.failureIntent, callingPackage, verificationBundle,
            resolvedType, userId, auxiliaryResponse.packageName,
                resolvedType, userId, auxiliaryResponse.packageName, auxiliaryResponse.splitName,
            auxiliaryResponse.splitName, auxiliaryResponse.versionCode,
                auxiliaryResponse.versionCode, auxiliaryResponse.token,
            auxiliaryResponse.token, auxiliaryResponse.needsPhaseTwo);
                auxiliaryResponse.needsPhaseTwo);
    }
    }


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