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

Commit 81d867f5 authored by Robert Sesek's avatar Robert Sesek Committed by Android (Google) Code Review
Browse files

Merge "Add external services, a way to run isolated processes as a different package."

parents 61f8f5d6 b9a8666e
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -328,6 +328,15 @@ public abstract class Context {
     */
    public static final int BIND_NOT_VISIBLE = 0x40000000;

    /**
     * Flag for {@link #bindService}: The service being bound is an
     * {@link android.R.attr#isolatedProcess isolated},
     * {@link android.R.attr#externalService external} service.  This binds the service into the
     * calling application's package, rather than the package in which the service is declared.
     * @hide
     */
    public static final int BIND_EXTERNAL_SERVICE = 0x80000000;

    /**
     * Returns an AssetManager instance for the application's package.
     * <p>
+5 −0
Original line number Diff line number Diff line
@@ -3885,6 +3885,11 @@ public class PackageParser {
                false)) {
            s.info.flags |= ServiceInfo.FLAG_ISOLATED_PROCESS;
        }
        if (sa.getBoolean(
                com.android.internal.R.styleable.AndroidManifestService_externalService,
                false)) {
            s.info.flags |= ServiceInfo.FLAG_EXTERNAL_SERVICE;
        }
        if (sa.getBoolean(
                com.android.internal.R.styleable.AndroidManifestService_singleUser,
                false)) {
+8 −0
Original line number Diff line number Diff line
@@ -48,6 +48,14 @@ public class ServiceInfo extends ComponentInfo
     */
    public static final int FLAG_ISOLATED_PROCESS = 0x0002;

    /**
     * Bit in {@link #flags}: If set, the service can be bound and run in the
     * calling application's package, rather than the package in which it is
     * declared.  Set from {@link android.R.attr#externalService} attribute.
     * @hide
     */
    public static final int FLAG_EXTERNAL_SERVICE = 0x0004;

    /**
     * Bit in {@link #flags}: If set, a single instance of the service will
     * run for all users on the device.  Set from the
+4 −0
Original line number Diff line number Diff line
@@ -1748,6 +1748,10 @@
        <attr name="isolatedProcess" format="boolean" />
        <attr name="singleUser" />
        <attr name="encryptionAware" />
        <!-- @hide If the service is an {@link #isolatedProcess} service, this permits a client to
             bind to the service as if it were running it its own package.  The service must also be
             {@link #exported} if this flag is set. -->
        <attr name="externalService" format="boolean" />
    </declare-styleable>

    <!-- The <code>receiver</code> tag declares an
+1 −0
Original line number Diff line number Diff line
@@ -2689,6 +2689,7 @@
    <public type="attr" name="tickMarkTint" />
    <public type="attr" name="tickMarkTintMode" />
    <public type="attr" name="canPerformGestures" />
    <public type="attr" name="externalService" />

    <public type="style" name="Theme.Material.Light.DialogWhenLarge.DarkActionBar" />
    <public type="style" name="Widget.Material.SeekBar.Discrete" />
Loading