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

Commit 747fa18d authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Move hasBinders from hidden to Module API" into main

parents b1651196 9f38c7f1
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -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);
+10 −3
Original line number Diff line number Diff line
@@ -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) {
+9 −0
Original line number Diff line number Diff line
@@ -266,6 +266,15 @@ flag {
    bug: "377557749"
}

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"