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

Commit b4165d72 authored by Patrick Baumann's avatar Patrick Baumann
Browse files

Sends resolving action to Instant App installer

This change adds the action being resolved to an installing Instant
App to the installer so it may increase friction for untrusted or
potentially dangerous sources (NFC, nearby, etc.)

Change-Id: If6c47a219e4ddf453fb406e2b212b024aa24ade6
Fixes: 63102749
Test: manual - debugged the ephemeral installer to ensure extra
parent 0deaa4c8
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -4454,6 +4454,12 @@ public class Intent implements Parcelable, Cloneable {
     */
    public static final String EXTRA_EPHEMERAL_TOKEN = "android.intent.extra.EPHEMERAL_TOKEN";

    /**
     * The action that triggered an instant application resolution.
     * @hide
     */
    public static final String EXTRA_INSTANT_APP_ACTION = "android.intent.extra.INSTANT_APP_ACTION";

    /**
     * The version code of the app to install components from.
     * @hide
+1 −0
Original line number Diff line number Diff line
@@ -258,6 +258,7 @@ public abstract class InstantAppResolver {
        if (origIntent.getData() != null) {
            intent.putExtra(Intent.EXTRA_EPHEMERAL_HOSTNAME, origIntent.getData().getHost());
        }
        intent.putExtra(Intent.EXTRA_INSTANT_APP_ACTION, origIntent.getAction());

        // We have all of the data we need; just start the installer without a second phase
        if (!needsPhaseTwo) {