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

Commit 4f869ffb authored by Martijn Coenen's avatar Martijn Coenen Committed by Android (Google) Code Review
Browse files

Merge changes from topic "sharedisolated"

* changes:
  Add allowedSharedIsolatedProcess attribute.
  Support shared isolated processes.
parents d056086a 4eae49c1
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -363,6 +363,7 @@ package android {
    field public static final int allowGameFpsOverride = 16844378; // 0x101065a
    field public static final int allowGameFpsOverride = 16844378; // 0x101065a
    field public static final int allowNativeHeapPointerTagging = 16844306; // 0x1010612
    field public static final int allowNativeHeapPointerTagging = 16844306; // 0x1010612
    field public static final int allowParallelSyncs = 16843570; // 0x1010332
    field public static final int allowParallelSyncs = 16843570; // 0x1010332
    field public static final int allowSharedIsolatedProcess;
    field public static final int allowSingleTap = 16843353; // 0x1010259
    field public static final int allowSingleTap = 16843353; // 0x1010259
    field public static final int allowTaskReparenting = 16843268; // 0x1010204
    field public static final int allowTaskReparenting = 16843268; // 0x1010204
    field public static final int allowUndo = 16843999; // 0x10104df
    field public static final int allowUndo = 16843999; // 0x10104df
@@ -9957,6 +9958,7 @@ package android.content {
    field public static final int BIND_INCLUDE_CAPABILITIES = 4096; // 0x1000
    field public static final int BIND_INCLUDE_CAPABILITIES = 4096; // 0x1000
    field public static final int BIND_NOT_FOREGROUND = 4; // 0x4
    field public static final int BIND_NOT_FOREGROUND = 4; // 0x4
    field public static final int BIND_NOT_PERCEPTIBLE = 256; // 0x100
    field public static final int BIND_NOT_PERCEPTIBLE = 256; // 0x100
    field public static final int BIND_SHARED_ISOLATED_PROCESS = 8192; // 0x2000
    field public static final int BIND_WAIVE_PRIORITY = 32; // 0x20
    field public static final int BIND_WAIVE_PRIORITY = 32; // 0x20
    field public static final String BIOMETRIC_SERVICE = "biometric";
    field public static final String BIOMETRIC_SERVICE = "biometric";
    field public static final String BLOB_STORE_SERVICE = "blob_store";
    field public static final String BLOB_STORE_SERVICE = "blob_store";
@@ -12533,6 +12535,7 @@ package android.content.pm {
    method public void dump(android.util.Printer, String);
    method public void dump(android.util.Printer, String);
    method public int getForegroundServiceType();
    method public int getForegroundServiceType();
    field @NonNull public static final android.os.Parcelable.Creator<android.content.pm.ServiceInfo> CREATOR;
    field @NonNull public static final android.os.Parcelable.Creator<android.content.pm.ServiceInfo> CREATOR;
    field public static final int FLAG_ALLOW_SHARED_ISOLATED_PROCESS = 16; // 0x10
    field public static final int FLAG_EXTERNAL_SERVICE = 4; // 0x4
    field public static final int FLAG_EXTERNAL_SERVICE = 4; // 0x4
    field public static final int FLAG_ISOLATED_PROCESS = 2; // 0x2
    field public static final int FLAG_ISOLATED_PROCESS = 2; // 0x2
    field public static final int FLAG_SINGLE_USER = 1073741824; // 0x40000000
    field public static final int FLAG_SINGLE_USER = 1073741824; // 0x40000000
+18 −1
Original line number Original line Diff line number Diff line
@@ -277,7 +277,8 @@ public abstract class Context {
            BIND_IMPORTANT,
            BIND_IMPORTANT,
            BIND_ADJUST_WITH_ACTIVITY,
            BIND_ADJUST_WITH_ACTIVITY,
            BIND_NOT_PERCEPTIBLE,
            BIND_NOT_PERCEPTIBLE,
            BIND_INCLUDE_CAPABILITIES
            BIND_INCLUDE_CAPABILITIES,
            BIND_SHARED_ISOLATED_PROCESS
    })
    })
    @Retention(RetentionPolicy.SOURCE)
    @Retention(RetentionPolicy.SOURCE)
    public @interface BindServiceFlags {}
    public @interface BindServiceFlags {}
@@ -394,6 +395,22 @@ public abstract class Context {
     */
     */
    public static final int BIND_INCLUDE_CAPABILITIES = 0x000001000;
    public static final int BIND_INCLUDE_CAPABILITIES = 0x000001000;


    /**
     * Flag for {@link #bindIsolatedService}: Bind the service into a shared isolated process.
     * Specifying this flag allows multiple isolated services to be running in a single shared
     * isolated process.
     *
     * The shared isolated process instance is identified by the <var>instanceName</var>
     * parameter in {@link #bindIsolatedService(Intent, int, String, Executor, ServiceConnection)}.
     *
     * Subsequent calls to {@link #bindIsolatedService} with the same <var>instanceName</var>
     * will cause the isolated service to be co-located in the same shared isolated process.
     *
     * Note that the shared isolated process is scoped to the calling app; once created, only
     * the calling app can bind additional isolated services into the shared process.
     */
    public static final int BIND_SHARED_ISOLATED_PROCESS = 0x00002000;

    /***********    Public flags above this line ***********/
    /***********    Public flags above this line ***********/
    /***********    Hidden flags below this line ***********/
    /***********    Hidden flags below this line ***********/


+14 −0
Original line number Original line Diff line number Diff line
@@ -78,6 +78,20 @@ public class ServiceInfo extends ComponentInfo
     */
     */
    public static final int FLAG_USE_APP_ZYGOTE = 0x0008;
    public static final int FLAG_USE_APP_ZYGOTE = 0x0008;


    /**
     * Bit in {@link #flags}: If set, and this is an {@link android.R.attr#isolatedProcess}
     * service, the service is allowed to be bound in a shared isolated process with other
     * isolated services. Note that these other isolated services can also belong to other
     * apps from different vendors.
     *
     * Shared isolated processes are created when using the
     * {@link android.content.Context#BIND_SHARED_ISOLATED_PROCESS) during service binding.
     *
     * Note that when this flag is used, the {@link android.R.attr#process} attribute is
     * ignored when the process is bound into a shared isolated process by a client.
     */
    public static final int FLAG_ALLOW_SHARED_ISOLATED_PROCESS = 0x0010;

    /**
    /**
     * Bit in {@link #flags} indicating if the service is visible to ephemeral applications.
     * Bit in {@link #flags} indicating if the service is visible to ephemeral applications.
     * @hide
     * @hide
+12 −0
Original line number Original line Diff line number Diff line
@@ -2963,6 +2963,18 @@
             Context.createAttributionContext() using the first attribution tag
             Context.createAttributionContext() using the first attribution tag
             contained here. -->
             contained here. -->
        <attr name="attributionTags" />
        <attr name="attributionTags" />
        <!-- If true, and this is an {@link android.R.attr#isolatedProcess} service, the service
             is allowed to be bound in a shared isolated process with other isolated services.
             Note that these other isolated services can also belong to other apps from different
             vendors.
             <p>
             Shared isolated processes are created when using the
             {@link android.content.Context#BIND_SHARED_ISOLATED_PROCESS) during service binding.
             <p>
             Note that when this flag is used, the {@link android.R.attr#process} attribute is
             ignored when the process is bound into a shared isolated process by a client.
        -->
        <attr name="allowSharedIsolatedProcess" format="boolean" />
    </declare-styleable>
    </declare-styleable>


    <!-- @hide The <code>apex-system-service</code> tag declares an apex system service
    <!-- @hide The <code>apex-system-service</code> tag declares an apex system service
+1 −0
Original line number Original line Diff line number Diff line
@@ -121,6 +121,7 @@
    <public name="visualQueryDetectionService" />
    <public name="visualQueryDetectionService" />
    <public name="physicalKeyboardHintLanguageTag" />
    <public name="physicalKeyboardHintLanguageTag" />
    <public name="physicalKeyboardHintLayoutType" />
    <public name="physicalKeyboardHintLayoutType" />
    <public name="allowSharedIsolatedProcess" />
  </staging-public-group>
  </staging-public-group>


  <staging-public-group type="id" first-id="0x01cd0000">
  <staging-public-group type="id" first-id="0x01cd0000">
Loading