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

Commit c72b3101 authored by Todd Kennedy's avatar Todd Kennedy Committed by Android (Google) Code Review
Browse files

Merge "Add ephemeral installs"

parents 70eaef41 2699f065
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -458,6 +458,8 @@ public final class Pm {
                params.setSize(Long.parseLong(nextOptionData()));
            } else if (opt.equals("--abi")) {
                params.abiOverride = checkAbiArgument(nextOptionData());
            } else if (opt.equals("--ephemeral")) {
                params.installFlags |= PackageManager.INSTALL_EPHEMERAL;
            } else if (opt.equals("--user")) {
                userId = Integer.parseInt(nextOptionData());
            } else if (opt.equals("--install-location")) {
+7 −0
Original line number Diff line number Diff line
@@ -382,6 +382,13 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
     */
    public static final int FLAG_HARDWARE_ACCELERATED = 1<<29;

    /**
     * Value for {@link #flags}: {@code true} if the application is blocked via restrictions
     * and for most purposes is considered as not installed.
     * {@hide}
     */
    public static final int FLAG_EPHEMERAL = 1<<30;

    /**
     * Value for {@link #flags}: true if code from this application will need to be
     * loaded into other applications' processes. On devices that support multiple
+16 −0
Original line number Diff line number Diff line
@@ -461,6 +461,14 @@ public abstract class PackageManager {
     */
    public static final int INSTALL_QUICK = 0x00000800;

    /**
     * Flag parameter for {@link #installPackage} to indicate that this package is
     * to be installed as a lightweight "ephemeral" app.
     *
     * @hide
     */
    public static final int INSTALL_EPHEMERAL = 0x00001000;

    /**
     * Flag parameter for
     * {@link #setComponentEnabledSetting(android.content.ComponentName, int, int)} to indicate
@@ -869,6 +877,14 @@ public abstract class PackageManager {
    /** {@hide} */
    public static final int INSTALL_FAILED_ABORTED = -115;

    /**
     * Installation failed return code: ephemeral app installs are incompatible with some
     * other installation flags supplied for the operation; or other circumstances such
     * as trying to upgrade a system app via an ephemeral install.
     * @hide
     */
    public static final int INSTALL_FAILED_EPHEMERAL_INVALID = -116;

    /**
     * Flag parameter for {@link #deletePackage} to indicate that you don't want to delete the
     * package's data directory.
+1 −0
Original line number Diff line number Diff line
@@ -627,6 +627,7 @@ public class PackageParser {
    public final static int PARSE_ENFORCE_CODE = 1<<10;
    // TODO: fix b/25118622; remove this entirely once signature processing is quick
    public final static int PARSE_SKIP_VERIFICATION = 1<<11;
    public final static int PARSE_IS_EPHEMERAL = 1<<12;

    private static final Comparator<String> sSplitNameComparator = new SplitNameComparator();

+5 −0
Original line number Diff line number Diff line
@@ -234,6 +234,11 @@ public class Environment {
        return new File(getDataDirectory(volumeUuid), "app");
    }

    /** {@hide} */
    public static File getDataAppEphemeralDirectory(String volumeUuid) {
        return new File(getDataDirectory(volumeUuid), "app-ephemeral");
    }

    /** {@hide} */
    @Deprecated
    public static File getDataUserDirectory(String volumeUuid) {
Loading