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

Commit d4b3fcac authored by Jeff Sharkey's avatar Jeff Sharkey Committed by Android (Google) Code Review
Browse files

Merge "Annotations for Bluetooth broadcast intents." into sc-dev

parents 373fafb2 f4598283
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -9046,8 +9046,8 @@ package android.bluetooth {
    field @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public static final String ACTION_CLASS_CHANGED = "android.bluetooth.device.action.CLASS_CHANGED";
    field @RequiresPermission(android.Manifest.permission.BLUETOOTH_SCAN) public static final String ACTION_FOUND = "android.bluetooth.device.action.FOUND";
    field @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public static final String ACTION_NAME_CHANGED = "android.bluetooth.device.action.NAME_CHANGED";
    field @RequiresPermission(android.Manifest.permission.BLUETOOTH_SCAN) public static final String ACTION_PAIRING_REQUEST = "android.bluetooth.device.action.PAIRING_REQUEST";
    field @RequiresPermission(android.Manifest.permission.BLUETOOTH_SCAN) public static final String ACTION_UUID = "android.bluetooth.device.action.UUID";
    field @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public static final String ACTION_PAIRING_REQUEST = "android.bluetooth.device.action.PAIRING_REQUEST";
    field @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public static final String ACTION_UUID = "android.bluetooth.device.action.UUID";
    field public static final int ADDRESS_TYPE_PUBLIC = 0; // 0x0
    field public static final int ADDRESS_TYPE_RANDOM = 1; // 0x1
    field public static final int BOND_BONDED = 12; // 0xc
+4 −4
Original line number Diff line number Diff line
@@ -1922,7 +1922,7 @@ package android.bluetooth {
    method @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public int getConnectionPolicy(@NonNull android.bluetooth.BluetoothDevice);
    method @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public boolean isAudioPlaying(@NonNull android.bluetooth.BluetoothDevice);
    method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public boolean setConnectionPolicy(@NonNull android.bluetooth.BluetoothDevice, int);
    field @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public static final String ACTION_CONNECTION_STATE_CHANGED = "android.bluetooth.a2dp-sink.profile.action.CONNECTION_STATE_CHANGED";
    field @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public static final String ACTION_CONNECTION_STATE_CHANGED = "android.bluetooth.a2dp-sink.profile.action.CONNECTION_STATE_CHANGED";
  }
  public final class BluetoothAdapter {
@@ -1974,7 +1974,7 @@ package android.bluetooth {
    field public static final int ACCESS_ALLOWED = 1; // 0x1
    field public static final int ACCESS_REJECTED = 2; // 0x2
    field public static final int ACCESS_UNKNOWN = 0; // 0x0
    field public static final String ACTION_SILENCE_MODE_CHANGED = "android.bluetooth.device.action.SILENCE_MODE_CHANGED";
    field @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public static final String ACTION_SILENCE_MODE_CHANGED = "android.bluetooth.device.action.SILENCE_MODE_CHANGED";
    field public static final String DEVICE_TYPE_DEFAULT = "Default";
    field public static final String DEVICE_TYPE_UNTETHERED_HEADSET = "Untethered Headset";
    field public static final String DEVICE_TYPE_WATCH = "Watch";
@@ -2036,7 +2036,7 @@ package android.bluetooth {
    method @NonNull @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public java.util.List<android.bluetooth.BluetoothDevice> getConnectedDevices();
    method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public int getConnectionPolicy(@NonNull android.bluetooth.BluetoothDevice);
    method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public boolean setConnectionPolicy(@NonNull android.bluetooth.BluetoothDevice, int);
    field public static final String ACTION_CONNECTION_STATE_CHANGED = "android.bluetooth.map.profile.action.CONNECTION_STATE_CHANGED";
    field @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public static final String ACTION_CONNECTION_STATE_CHANGED = "android.bluetooth.map.profile.action.CONNECTION_STATE_CHANGED";
  }
  public final class BluetoothMapClient implements android.bluetooth.BluetoothProfile {
@@ -2065,7 +2065,7 @@ package android.bluetooth {
  public class BluetoothPbap implements android.bluetooth.BluetoothProfile {
    method @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public int getConnectionState(@NonNull android.bluetooth.BluetoothDevice);
    method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public boolean setConnectionPolicy(@NonNull android.bluetooth.BluetoothDevice, int);
    field @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public static final String ACTION_CONNECTION_STATE_CHANGED = "android.bluetooth.pbap.profile.action.CONNECTION_STATE_CHANGED";
    field @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public static final String ACTION_CONNECTION_STATE_CHANGED = "android.bluetooth.pbap.profile.action.CONNECTION_STATE_CHANGED";
  }
  public interface BluetoothProfile {
+12 −0
Original line number Diff line number Diff line
@@ -27,7 +27,19 @@ import java.lang.annotation.Target;

/**
 * Denotes that the annotated element requires no permissions.
 * <p>
 * This explicit annotation helps distinguish which of three states that an
 * element may exist in:
 * <ul>
 * <li>Annotated with {@link RequiresPermission}, indicating that an element
 * requires (or may require) one or more permissions.
 * <li>Annotated with {@link RequiresNoPermission}, indicating that an element
 * requires no permissions.
 * <li>Neither annotation, indicating that no explicit declaration about
 * permissions has been made for that element.
 * </ul>
 *
 * @see RequiresPermission
 * @hide
 */
@Retention(CLASS)
+1 −0
Original line number Diff line number Diff line
@@ -74,6 +74,7 @@ import java.lang.annotation.Target;
 *   public static final String ACTION_CALL = "android.intent.action.CALL";
 * }</pre>
 *
 * @see RequiresNoPermission
 * @hide
 */
@Retention(CLASS)
+2 −0
Original line number Diff line number Diff line
@@ -104,6 +104,8 @@ public final class BluetoothA2dp implements BluetoothProfile {
            "android.bluetooth.a2dp.profile.action.PLAYING_STATE_CHANGED";

    /** @hide */
    @RequiresBluetoothConnectPermission
    @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT)
    @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
    public static final String ACTION_AVRCP_CONNECTION_STATE_CHANGED =
            "android.bluetooth.a2dp.profile.action.AVRCP_CONNECTION_STATE_CHANGED";
Loading