diff options
| -rw-r--r-- | core/api/module-lib-current.txt | 7 | ||||
| -rw-r--r-- | core/java/android/os/Bundle.java | 13 | ||||
| -rw-r--r-- | core/java/android/os/flags.aconfig | 9 |
3 files changed, 26 insertions, 3 deletions
diff --git a/core/api/module-lib-current.txt b/core/api/module-lib-current.txt index bc73220cb4c1..dcb4a4055f14 100644 --- a/core/api/module-lib-current.txt +++ b/core/api/module-lib-current.txt @@ -379,6 +379,13 @@ package android.os { field public static final int DEVICE_INITIAL_SDK_INT; } + public final class Bundle extends android.os.BaseBundle implements java.lang.Cloneable android.os.Parcelable { + method @FlaggedApi("android.os.enable_has_binders") public int hasBinders(); + field @FlaggedApi("android.os.enable_has_binders") public static final int STATUS_BINDERS_NOT_PRESENT = 0; // 0x0 + field @FlaggedApi("android.os.enable_has_binders") public static final int STATUS_BINDERS_PRESENT = 1; // 0x1 + field @FlaggedApi("android.os.enable_has_binders") public static final int STATUS_BINDERS_UNKNOWN = 2; // 0x2 + } + public class Handler { method @FlaggedApi("android.os.mainline_vcn_platform_api") public final boolean hasMessagesOrCallbacks(); method @FlaggedApi("android.os.mainline_vcn_platform_api") public final void removeCallbacksAndEqualMessages(@Nullable Object); diff --git a/core/java/android/os/Bundle.java b/core/java/android/os/Bundle.java index c18fb0c38b82..008297c57e40 100644 --- a/core/java/android/os/Bundle.java +++ b/core/java/android/os/Bundle.java @@ -18,10 +18,12 @@ package android.os; import static java.util.Objects.requireNonNull; +import android.annotation.FlaggedApi; import android.annotation.IntDef; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.SuppressLint; +import android.annotation.SystemApi; import android.compat.annotation.UnsupportedAppUsage; import android.util.ArrayMap; import android.util.Size; @@ -72,16 +74,18 @@ public final class Bundle extends BaseBundle implements Cloneable, Parcelable { /** * Status when the Bundle can <b>assert</b> that the underlying Parcel DOES NOT contain * Binder object(s). - * * @hide */ + @FlaggedApi(Flags.FLAG_ENABLE_HAS_BINDERS) + @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) public static final int STATUS_BINDERS_NOT_PRESENT = 0; /** * Status when the Bundle can <b>assert</b> that there are Binder object(s) in the Parcel. - * * @hide */ + @FlaggedApi(Flags.FLAG_ENABLE_HAS_BINDERS) + @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) public static final int STATUS_BINDERS_PRESENT = 1; /** @@ -94,9 +98,10 @@ public final class Bundle extends BaseBundle implements Cloneable, Parcelable { * object to the Bundle but it is not possible to assert this fact unless the Bundle is written * to a Parcel. * </p> - * * @hide */ + @FlaggedApi(Flags.FLAG_ENABLE_HAS_BINDERS) + @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) public static final int STATUS_BINDERS_UNKNOWN = 2; /** @hide */ @@ -417,6 +422,8 @@ public final class Bundle extends BaseBundle implements Cloneable, Parcelable { * Returns a status indicating whether the bundle contains any parcelled Binder objects. * @hide */ + @FlaggedApi(Flags.FLAG_ENABLE_HAS_BINDERS) + @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) public @HasBinderStatus int hasBinders() { if ((mFlags & FLAG_HAS_BINDERS_KNOWN) != 0) { if ((mFlags & FLAG_HAS_BINDERS) != 0) { diff --git a/core/java/android/os/flags.aconfig b/core/java/android/os/flags.aconfig index 9c83bc2c88ec..7b4437803efa 100644 --- a/core/java/android/os/flags.aconfig +++ b/core/java/android/os/flags.aconfig @@ -244,6 +244,15 @@ flag { flag { namespace: "system_performance" + name: "enable_has_binders" + is_exported: true + description: "Add hasBinders to Public API under a flag." + is_fixed_read_only: true + bug: "330345513" +} + +flag { + namespace: "system_performance" name: "perfetto_sdk_tracing" description: "Tracing using Perfetto SDK." bug: "303199244" |