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

Commit f4488dab authored by Chad Brubaker's avatar Chad Brubaker Committed by android-build-merger
Browse files

Merge "Allow apps to provide the Instant App installer extra information" into oc-dev

am: a9d0e6b2

Change-Id: I6edd3a615c1c276b6d7842af471dc928281f1f6f
parents 8588c09a a9d0e6b2
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -4030,6 +4030,7 @@ package android.app {
    method public static android.app.ActivityOptions makeTaskLaunchBehind();
    method public static android.app.ActivityOptions makeThumbnailScaleUpAnimation(android.view.View, android.graphics.Bitmap, int, int);
    method public void requestUsageTimeReport(android.app.PendingIntent);
    method public android.app.ActivityOptions setAppVerificationBundle(android.os.Bundle);
    method public android.app.ActivityOptions setLaunchBounds(android.graphics.Rect);
    method public android.app.ActivityOptions setLaunchDisplayId(int);
    method public android.os.Bundle toBundle();
+1 −0
Original line number Diff line number Diff line
@@ -4179,6 +4179,7 @@ package android.app {
    method public static android.app.ActivityOptions makeTaskLaunchBehind();
    method public static android.app.ActivityOptions makeThumbnailScaleUpAnimation(android.view.View, android.graphics.Bitmap, int, int);
    method public void requestUsageTimeReport(android.app.PendingIntent);
    method public android.app.ActivityOptions setAppVerificationBundle(android.os.Bundle);
    method public android.app.ActivityOptions setLaunchBounds(android.graphics.Rect);
    method public android.app.ActivityOptions setLaunchDisplayId(int);
    method public android.os.Bundle toBundle();
+1 −0
Original line number Diff line number Diff line
@@ -4040,6 +4040,7 @@ package android.app {
    method public static android.app.ActivityOptions makeTaskLaunchBehind();
    method public static android.app.ActivityOptions makeThumbnailScaleUpAnimation(android.view.View, android.graphics.Bitmap, int, int);
    method public void requestUsageTimeReport(android.app.PendingIntent);
    method public android.app.ActivityOptions setAppVerificationBundle(android.os.Bundle);
    method public android.app.ActivityOptions setLaunchBounds(android.graphics.Rect);
    method public android.app.ActivityOptions setLaunchDisplayId(int);
    method public void setLaunchStackId(int);
+32 −0
Original line number Diff line number Diff line
@@ -211,6 +211,9 @@ public class ActivityOptions {
    private static final String KEY_USAGE_TIME_REPORT = "android:activity.usageTimeReport";
    private static final String KEY_ROTATION_ANIMATION_HINT = "android:activity.rotationAnimationHint";

    private static final String KEY_INSTANT_APP_VERIFICATION_BUNDLE
            = "android:instantapps.installerbundle";

    /** @hide */
    public static final int ANIM_NONE = 0;
    /** @hide */
@@ -264,6 +267,7 @@ public class ActivityOptions {
    private boolean mTaskOverlayCanResume;
    private AppTransitionAnimationSpec mAnimSpecs[];
    private int mRotationAnimationHint = -1;
    private Bundle mAppVerificationBundle;

    /**
     * Create an ActivityOptions specifying a custom animation to run when
@@ -886,6 +890,7 @@ public class ActivityOptions {
                    opts.getBinder(KEY_ANIMATION_FINISHED_LISTENER));
        }
        mRotationAnimationHint = opts.getInt(KEY_ROTATION_ANIMATION_HINT);
        mAppVerificationBundle = opts.getBundle(KEY_INSTANT_APP_VERIFICATION_BUNDLE);
    }

    /**
@@ -1275,6 +1280,9 @@ public class ActivityOptions {
            b.putBinder(KEY_ANIMATION_FINISHED_LISTENER, mAnimationFinishedListener.asBinder());
        }
        b.putInt(KEY_ROTATION_ANIMATION_HINT, mRotationAnimationHint);
        if (mAppVerificationBundle != null) {
            b.putBundle(KEY_INSTANT_APP_VERIFICATION_BUNDLE, mAppVerificationBundle);
        }

        return b;
    }
@@ -1342,6 +1350,30 @@ public class ActivityOptions {
        mRotationAnimationHint = hint;
    }

    /**
     * Pop the extra verification bundle for the installer.
     * This removes the bundle from the ActivityOptions to make sure the installer bundle
     * is only available once.
     * @hide
     */
    public Bundle popAppVerificationBundle() {
        Bundle out = mAppVerificationBundle;
        mAppVerificationBundle = null;
        return out;
    }

    /**
     * Set the {@link Bundle} that is provided to the app installer for additional verification
     * if the call to {@link Context#startActivity} results in an app being installed.
     *
     * This Bundle is not provided to any other app besides the installer.
     */
    public ActivityOptions setAppVerificationBundle(Bundle bundle) {
        mAppVerificationBundle = bundle;
        return this;

    }

    /** @hide */
    @Override
    public String toString() {
+15 −0
Original line number Diff line number Diff line
@@ -4421,6 +4421,21 @@ public class Intent implements Parcelable, Cloneable {
     */
    public static final String EXTRA_VERSION_CODE = "android.intent.extra.VERSION_CODE";

    /**
     * The app that triggered the ephemeral installation.
     * @hide
     */
    public static final String EXTRA_CALLING_PACKAGE
            = "android.intent.extra.CALLING_PACKAGE";

    /**
     * Optional calling app provided bundle containing additional launch information the
     * installer may use.
     * @hide
     */
    public static final String EXTRA_VERIFICATION_BUNDLE
            = "android.intent.extra.VERIFICATION_BUNDLE";

    /**
     * A Bundle forming a mapping of potential target package names to different extras Bundles
     * to add to the default intent extras in {@link #EXTRA_INTENT} when used with
Loading