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

Commit 336ae5b6 authored by Chad Brubaker's avatar Chad Brubaker
Browse files

Add ACTION_EPHEMERAL_RESOLVER_SETTINGS

This Intent will be used in Settings to show the settings UI for the
Ephemeral resolver. Settings can get the correct component to send the
Intent to by calling
PackageManager.getInstantAppResolverSettingsComponent

Bug: 35918998
Test: Boots
Change-Id: I0edcf85704f2c19e0ee27f91b6ef057d52e32778
(cherry picked from commit aa49cb86)
parent 27cec324
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -11172,6 +11172,7 @@ package android.content.pm {
    method public abstract byte[] getInstantAppCookie();
    method public abstract int getInstantAppCookieMaxSize();
    method public abstract android.graphics.drawable.Drawable getInstantAppIcon(java.lang.String);
    method public abstract android.content.ComponentName getInstantAppResolverSettingsComponent();
    method public abstract java.util.List<android.content.pm.InstantAppInfo> getInstantApps();
    method public abstract android.content.pm.InstrumentationInfo getInstrumentationInfo(android.content.ComponentName, int) throws android.content.pm.PackageManager.NameNotFoundException;
    method public abstract java.util.List<android.content.pm.IntentFilterVerificationInfo> getIntentFilterVerifications(java.lang.String);
@@ -44215,6 +44216,7 @@ package android.test.mock {
    method public byte[] getInstantAppCookie();
    method public int getInstantAppCookieMaxSize();
    method public android.graphics.drawable.Drawable getInstantAppIcon(java.lang.String);
    method public android.content.ComponentName getInstantAppResolverSettingsComponent();
    method public java.util.List<android.content.pm.InstantAppInfo> getInstantApps();
    method public android.content.pm.InstrumentationInfo getInstrumentationInfo(android.content.ComponentName, int) throws android.content.pm.PackageManager.NameNotFoundException;
    method public java.util.List<android.content.pm.IntentFilterVerificationInfo> getIntentFilterVerifications(java.lang.String);
+9 −0
Original line number Diff line number Diff line
@@ -2630,4 +2630,13 @@ public class ApplicationPackageManager extends PackageManager {
            throw e.rethrowAsRuntimeException();
        }
    }

    @Override
    public ComponentName getInstantAppResolverSettingsComponent() {
        try {
            return mPM.getInstantAppResolverSettingsComponent();
        } catch (RemoteException e) {
            throw e.rethrowAsRuntimeException();
        }
    }
}
+13 −0
Original line number Diff line number Diff line
@@ -1531,6 +1531,19 @@ public class Intent implements Parcelable, Cloneable {
    public static final String ACTION_RESOLVE_EPHEMERAL_PACKAGE
            = "android.intent.action.RESOLVE_EPHEMERAL_PACKAGE";

    /**
     * Activity Action: Launch ephemeral settings.
     *
     * <p class="note">
     * This is a protected intent that can only be sent by the system.
     * </p>
     *
     * @hide
     */
    @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
    public static final String ACTION_EPHEMERAL_RESOLVER_SETTINGS
            = "android.intent.action.EPHEMERAL_RESOLVER_SETTINGS";

    /**
     * Used as a string extra field with {@link #ACTION_INSTALL_PACKAGE} to install a
     * package.  Specifies the installer package name; this package will receive the
+2 −0
Original line number Diff line number Diff line
@@ -630,4 +630,6 @@ interface IPackageManager {
    boolean canRequestPackageInstalls(String packageName, int userId);

    void deletePreloadsFileCache();

    ComponentName getInstantAppResolverSettingsComponent();
}
+10 −0
Original line number Diff line number Diff line
@@ -6233,4 +6233,14 @@ public abstract class PackageManager {
     * @see {@link android.provider.Settings#ACTION_MANAGE_EXTERNAL_SOURCES}
     */
    public abstract boolean canRequestPackageInstalls();

    /**
     * Return the {@link ComponentName} of the activity providing Settings for the Instant App
     * resolver.
     *
     * @see {@link android.content.intent#ACTION_EPHEMERAL_RESOLVER_SETTINGS}
     * @hide
     */
    @SystemApi
    public abstract ComponentName getInstantAppResolverSettingsComponent();
}
Loading