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

Commit 7f3a2f81 authored by Patrick's avatar Patrick Committed by Patrick Baumann
Browse files

Removes deprecated EXTRA_EPHEMERAL*

This change removes deprecated and unused Intent extra names that were
replaced in P with EXTRA_INSTANT* equivalents.

Change-Id: Idd57b9db5896eda24349d01c0d7557f2d4e820ea
Fixes: 72700831
Test: build succeeds and instant app launches with installer on system image
parent 55f12784
Loading
Loading
Loading
Loading
+0 −36
Original line number Original line Diff line number Diff line
@@ -4601,15 +4601,6 @@ public class Intent implements Parcelable, Cloneable {
     */
     */
    public static final String EXTRA_INITIAL_INTENTS = "android.intent.extra.INITIAL_INTENTS";
    public static final String EXTRA_INITIAL_INTENTS = "android.intent.extra.INITIAL_INTENTS";


    /**
     * A {@link IntentSender} to start after ephemeral installation success.
     * @deprecated Use {@link #EXTRA_INSTANT_APP_SUCCESS).
     * @removed
     * @hide
     */
    @Deprecated
    public static final String EXTRA_EPHEMERAL_SUCCESS = "android.intent.extra.EPHEMERAL_SUCCESS";

    /**
    /**
     * A {@link IntentSender} to start after instant app installation success.
     * A {@link IntentSender} to start after instant app installation success.
     * @hide
     * @hide
@@ -4618,15 +4609,6 @@ public class Intent implements Parcelable, Cloneable {
    public static final String EXTRA_INSTANT_APP_SUCCESS =
    public static final String EXTRA_INSTANT_APP_SUCCESS =
            "android.intent.extra.INSTANT_APP_SUCCESS";
            "android.intent.extra.INSTANT_APP_SUCCESS";


    /**
     * A {@link IntentSender} to start after ephemeral installation failure.
     * @deprecated Use {@link #EXTRA_INSTANT_APP_FAILURE).
     * @removed
     * @hide
     */
    @Deprecated
    public static final String EXTRA_EPHEMERAL_FAILURE = "android.intent.extra.EPHEMERAL_FAILURE";

    /**
    /**
     * A {@link IntentSender} to start after instant app installation failure.
     * A {@link IntentSender} to start after instant app installation failure.
     * @hide
     * @hide
@@ -4635,15 +4617,6 @@ public class Intent implements Parcelable, Cloneable {
    public static final String EXTRA_INSTANT_APP_FAILURE =
    public static final String EXTRA_INSTANT_APP_FAILURE =
            "android.intent.extra.INSTANT_APP_FAILURE";
            "android.intent.extra.INSTANT_APP_FAILURE";


    /**
     * The host name that triggered an ephemeral resolution.
     * @deprecated Use {@link #EXTRA_INSTANT_APP_HOSTNAME).
     * @removed
     * @hide
     */
    @Deprecated
    public static final String EXTRA_EPHEMERAL_HOSTNAME = "android.intent.extra.EPHEMERAL_HOSTNAME";

    /**
    /**
     * The host name that triggered an instant app resolution.
     * The host name that triggered an instant app resolution.
     * @hide
     * @hide
@@ -4652,15 +4625,6 @@ public class Intent implements Parcelable, Cloneable {
    public static final String EXTRA_INSTANT_APP_HOSTNAME =
    public static final String EXTRA_INSTANT_APP_HOSTNAME =
            "android.intent.extra.INSTANT_APP_HOSTNAME";
            "android.intent.extra.INSTANT_APP_HOSTNAME";


    /**
     * An opaque token to track ephemeral resolution.
     * @deprecated Use {@link #EXTRA_INSTANT_APP_TOKEN).
     * @removed
     * @hide
     */
    @Deprecated
    public static final String EXTRA_EPHEMERAL_TOKEN = "android.intent.extra.EPHEMERAL_TOKEN";

    /**
    /**
     * An opaque token to track instant app resolution.
     * An opaque token to track instant app resolution.
     * @hide
     * @hide
+0 −1
Original line number Original line Diff line number Diff line
@@ -625,7 +625,6 @@ public class PhoneStatusBarPolicy implements Callback, Callbacks,
                    .putExtra(Intent.EXTRA_PACKAGE_NAME, appInfo.packageName)
                    .putExtra(Intent.EXTRA_PACKAGE_NAME, appInfo.packageName)
                    .putExtra(Intent.EXTRA_VERSION_CODE, (int) (appInfo.versionCode & 0x7fffffff))
                    .putExtra(Intent.EXTRA_VERSION_CODE, (int) (appInfo.versionCode & 0x7fffffff))
                    .putExtra(Intent.EXTRA_LONG_VERSION_CODE, appInfo.versionCode)
                    .putExtra(Intent.EXTRA_LONG_VERSION_CODE, appInfo.versionCode)
                    .putExtra(Intent.EXTRA_EPHEMERAL_FAILURE, pendingIntent)
                    .putExtra(Intent.EXTRA_INSTANT_APP_FAILURE, pendingIntent);
                    .putExtra(Intent.EXTRA_INSTANT_APP_FAILURE, pendingIntent);


            PendingIntent webPendingIntent = PendingIntent.getActivity(mContext, 0, goToWebIntent, 0);
            PendingIntent webPendingIntent = PendingIntent.getActivity(mContext, 0, goToWebIntent, 0);
+0 −7
Original line number Original line Diff line number Diff line
@@ -265,13 +265,9 @@ public abstract class InstantAppResolver {
                | Intent.FLAG_ACTIVITY_NO_HISTORY
                | Intent.FLAG_ACTIVITY_NO_HISTORY
                | Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
                | Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
        if (token != null) {
        if (token != null) {
            // TODO(b/72700831): remove populating old extra
            intent.putExtra(Intent.EXTRA_EPHEMERAL_TOKEN, token);
            intent.putExtra(Intent.EXTRA_INSTANT_APP_TOKEN, token);
            intent.putExtra(Intent.EXTRA_INSTANT_APP_TOKEN, token);
        }
        }
        if (origIntent.getData() != null) {
        if (origIntent.getData() != null) {
            // TODO(b/72700831): remove populating old extra
            intent.putExtra(Intent.EXTRA_EPHEMERAL_HOSTNAME, origIntent.getData().getHost());
            intent.putExtra(Intent.EXTRA_INSTANT_APP_HOSTNAME, origIntent.getData().getHost());
            intent.putExtra(Intent.EXTRA_INSTANT_APP_HOSTNAME, origIntent.getData().getHost());
        }
        }
        intent.putExtra(Intent.EXTRA_INSTANT_APP_ACTION, origIntent.getAction());
        intent.putExtra(Intent.EXTRA_INSTANT_APP_ACTION, origIntent.getAction());
@@ -308,7 +304,6 @@ public abstract class InstantAppResolver {
                                    null /*bOptions*/, userId);
                                    null /*bOptions*/, userId);
                    IntentSender failureSender = new IntentSender(failureIntentTarget);
                    IntentSender failureSender = new IntentSender(failureIntentTarget);
                    // TODO(b/72700831): remove populating old extra
                    // TODO(b/72700831): remove populating old extra
                    intent.putExtra(Intent.EXTRA_EPHEMERAL_FAILURE, failureSender);
                    intent.putExtra(Intent.EXTRA_INSTANT_APP_FAILURE, failureSender);
                    intent.putExtra(Intent.EXTRA_INSTANT_APP_FAILURE, failureSender);
                } catch (RemoteException ignore) { /* ignore; same process */ }
                } catch (RemoteException ignore) { /* ignore; same process */ }
            }
            }
@@ -327,8 +322,6 @@ public abstract class InstantAppResolver {
                                        | PendingIntent.FLAG_IMMUTABLE,
                                        | PendingIntent.FLAG_IMMUTABLE,
                                null /*bOptions*/, userId);
                                null /*bOptions*/, userId);
                IntentSender successSender = new IntentSender(successIntentTarget);
                IntentSender successSender = new IntentSender(successIntentTarget);
                // TODO(b/72700831): remove populating old extra
                intent.putExtra(Intent.EXTRA_EPHEMERAL_SUCCESS, successSender);
                intent.putExtra(Intent.EXTRA_INSTANT_APP_SUCCESS, successSender);
                intent.putExtra(Intent.EXTRA_INSTANT_APP_SUCCESS, successSender);
            } catch (RemoteException ignore) { /* ignore; same process */ }
            } catch (RemoteException ignore) { /* ignore; same process */ }
            if (verificationBundle != null) {
            if (verificationBundle != null) {