1*344a7f5eSAndroid Build Coastguard Worker// Signature format: 2.0 2*344a7f5eSAndroid Build Coastguard Workerpackage android.bluetooth { 3*344a7f5eSAndroid Build Coastguard Worker 4*344a7f5eSAndroid Build Coastguard Worker public final class BluetoothA2dp implements android.bluetooth.BluetoothProfile { 5*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public void disableOptionalCodecs(@NonNull android.bluetooth.BluetoothDevice); 6*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public void enableOptionalCodecs(@NonNull android.bluetooth.BluetoothDevice); 7*344a7f5eSAndroid Build Coastguard Worker method @Nullable @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public android.bluetooth.BufferConstraints getBufferConstraints(); 8*344a7f5eSAndroid Build Coastguard Worker method @Nullable @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public android.bluetooth.BluetoothCodecStatus getCodecStatus(@NonNull android.bluetooth.BluetoothDevice); 9*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public int getConnectionPolicy(@NonNull android.bluetooth.BluetoothDevice); 10*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public int getDynamicBufferSupport(); 11*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public int isOptionalCodecsEnabled(@NonNull android.bluetooth.BluetoothDevice); 12*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public int isOptionalCodecsSupported(@NonNull android.bluetooth.BluetoothDevice); 13*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public void setAvrcpAbsoluteVolume(int); 14*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public boolean setBufferLengthMillis(int, int); 15*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public void setCodecConfigPreference(@NonNull android.bluetooth.BluetoothDevice, @NonNull android.bluetooth.BluetoothCodecConfig); 16*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public boolean setConnectionPolicy(@NonNull android.bluetooth.BluetoothDevice, int); 17*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public void setOptionalCodecsEnabled(@NonNull android.bluetooth.BluetoothDevice, int); 18*344a7f5eSAndroid Build Coastguard Worker field @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public static final String ACTION_ACTIVE_DEVICE_CHANGED = "android.bluetooth.a2dp.profile.action.ACTIVE_DEVICE_CHANGED"; 19*344a7f5eSAndroid Build Coastguard Worker field @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public static final String ACTION_CODEC_CONFIG_CHANGED = "android.bluetooth.a2dp.profile.action.CODEC_CONFIG_CHANGED"; 20*344a7f5eSAndroid Build Coastguard Worker field public static final int DYNAMIC_BUFFER_SUPPORT_A2DP_OFFLOAD = 1; // 0x1 21*344a7f5eSAndroid Build Coastguard Worker field public static final int DYNAMIC_BUFFER_SUPPORT_A2DP_SOFTWARE_ENCODING = 2; // 0x2 22*344a7f5eSAndroid Build Coastguard Worker field public static final int DYNAMIC_BUFFER_SUPPORT_NONE = 0; // 0x0 23*344a7f5eSAndroid Build Coastguard Worker field public static final int OPTIONAL_CODECS_NOT_SUPPORTED = 0; // 0x0 24*344a7f5eSAndroid Build Coastguard Worker field public static final int OPTIONAL_CODECS_PREF_DISABLED = 0; // 0x0 25*344a7f5eSAndroid Build Coastguard Worker field public static final int OPTIONAL_CODECS_PREF_ENABLED = 1; // 0x1 26*344a7f5eSAndroid Build Coastguard Worker field public static final int OPTIONAL_CODECS_PREF_UNKNOWN = -1; // 0xffffffff 27*344a7f5eSAndroid Build Coastguard Worker field public static final int OPTIONAL_CODECS_SUPPORTED = 1; // 0x1 28*344a7f5eSAndroid Build Coastguard Worker field public static final int OPTIONAL_CODECS_SUPPORT_UNKNOWN = -1; // 0xffffffff 29*344a7f5eSAndroid Build Coastguard Worker } 30*344a7f5eSAndroid Build Coastguard Worker 31*344a7f5eSAndroid Build Coastguard Worker public final class BluetoothA2dpSink implements android.bluetooth.BluetoothProfile { 32*344a7f5eSAndroid Build Coastguard Worker method public void finalize(); 33*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public int getConnectionPolicy(@NonNull android.bluetooth.BluetoothDevice); 34*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public boolean isAudioPlaying(@NonNull android.bluetooth.BluetoothDevice); 35*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public boolean setConnectionPolicy(@NonNull android.bluetooth.BluetoothDevice, int); 36*344a7f5eSAndroid Build Coastguard Worker field @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public static final String ACTION_CONNECTION_STATE_CHANGED = "android.bluetooth.a2dp-sink.profile.action.CONNECTION_STATE_CHANGED"; 37*344a7f5eSAndroid Build Coastguard Worker } 38*344a7f5eSAndroid Build Coastguard Worker 39*344a7f5eSAndroid Build Coastguard Worker public final class BluetoothActivityEnergyInfo implements android.os.Parcelable { 40*344a7f5eSAndroid Build Coastguard Worker method public int getBluetoothStackState(); 41*344a7f5eSAndroid Build Coastguard Worker method public long getControllerEnergyUsed(); 42*344a7f5eSAndroid Build Coastguard Worker method public long getControllerIdleTimeMillis(); 43*344a7f5eSAndroid Build Coastguard Worker method public long getControllerRxTimeMillis(); 44*344a7f5eSAndroid Build Coastguard Worker method public long getControllerTxTimeMillis(); 45*344a7f5eSAndroid Build Coastguard Worker method public long getTimestampMillis(); 46*344a7f5eSAndroid Build Coastguard Worker method @NonNull public java.util.List<android.bluetooth.UidTraffic> getUidTraffic(); 47*344a7f5eSAndroid Build Coastguard Worker method public boolean isValid(); 48*344a7f5eSAndroid Build Coastguard Worker field public static final int BT_STACK_STATE_INVALID = 0; // 0x0 49*344a7f5eSAndroid Build Coastguard Worker field public static final int BT_STACK_STATE_STATE_ACTIVE = 1; // 0x1 50*344a7f5eSAndroid Build Coastguard Worker field public static final int BT_STACK_STATE_STATE_IDLE = 3; // 0x3 51*344a7f5eSAndroid Build Coastguard Worker field public static final int BT_STACK_STATE_STATE_SCANNING = 2; // 0x2 52*344a7f5eSAndroid Build Coastguard Worker field @NonNull public static final android.os.Parcelable.Creator<android.bluetooth.BluetoothActivityEnergyInfo> CREATOR; 53*344a7f5eSAndroid Build Coastguard Worker } 54*344a7f5eSAndroid Build Coastguard Worker 55*344a7f5eSAndroid Build Coastguard Worker public final class BluetoothAdapter { 56*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public boolean addOnMetadataChangedListener(@NonNull android.bluetooth.BluetoothDevice, @NonNull java.util.concurrent.Executor, @NonNull android.bluetooth.BluetoothAdapter.OnMetadataChangedListener); 57*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public boolean clearBluetooth(); 58*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public boolean disable(boolean); 59*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean disableBLE(); 60*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean enableBLE(); 61*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean enableNoAutoConnect(); 62*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public void generateLocalOobData(int, @NonNull java.util.concurrent.Executor, @NonNull android.bluetooth.BluetoothAdapter.OobDataCallback); 63*344a7f5eSAndroid Build Coastguard Worker method @NonNull @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public java.util.List<android.bluetooth.BluetoothDevice> getActiveDevices(int); 64*344a7f5eSAndroid Build Coastguard Worker method public int getConnectionState(); 65*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public long getDiscoveryEndMillis(); 66*344a7f5eSAndroid Build Coastguard Worker method @NonNull @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public java.util.List<android.bluetooth.BluetoothDevice> getMostRecentlyConnectedDevices(); 67*344a7f5eSAndroid Build Coastguard Worker method @NonNull @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public java.util.List<java.lang.Integer> getSupportedProfiles(); 68*344a7f5eSAndroid Build Coastguard Worker method @NonNull @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public java.util.List<android.os.ParcelUuid> getUuidsList(); 69*344a7f5eSAndroid Build Coastguard Worker method public boolean isBleScanAlwaysAvailable(); 70*344a7f5eSAndroid Build Coastguard Worker method public boolean isLeEnabled(); 71*344a7f5eSAndroid Build Coastguard Worker method @NonNull public static String nameForState(int); 72*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public boolean registerBluetoothConnectionCallback(@NonNull java.util.concurrent.Executor, @NonNull android.bluetooth.BluetoothAdapter.BluetoothConnectionCallback); 73*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED, android.Manifest.permission.MODIFY_PHONE_STATE}) public boolean removeActiveDevice(int); 74*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public boolean removeOnMetadataChangedListener(@NonNull android.bluetooth.BluetoothDevice, @NonNull android.bluetooth.BluetoothAdapter.OnMetadataChangedListener); 75*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public void requestControllerActivityEnergyInfo(@NonNull java.util.concurrent.Executor, @NonNull android.bluetooth.BluetoothAdapter.OnBluetoothActivityEnergyInfoCallback); 76*344a7f5eSAndroid Build Coastguard Worker method @NonNull @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public android.bluetooth.BluetoothSocket retrieveConnectedRfcommSocket(@NonNull java.util.UUID); 77*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED, android.Manifest.permission.MODIFY_PHONE_STATE}) public boolean setActiveDevice(@NonNull android.bluetooth.BluetoothDevice, int); 78*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_SCAN, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public int setDiscoverableTimeout(@NonNull java.time.Duration); 79*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_SCAN, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public int setScanMode(int); 80*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public int startRfcommServer(@NonNull String, @NonNull java.util.UUID, @NonNull android.app.PendingIntent); 81*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public int stopRfcommServer(@NonNull java.util.UUID); 82*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public boolean unregisterBluetoothConnectionCallback(@NonNull android.bluetooth.BluetoothAdapter.BluetoothConnectionCallback); 83*344a7f5eSAndroid Build Coastguard Worker field public static final String ACTION_BLE_STATE_CHANGED = "android.bluetooth.adapter.action.BLE_STATE_CHANGED"; 84*344a7f5eSAndroid Build Coastguard Worker field public static final String ACTION_REQUEST_BLE_SCAN_ALWAYS_AVAILABLE = "android.bluetooth.adapter.action.REQUEST_BLE_SCAN_ALWAYS_AVAILABLE"; 85*344a7f5eSAndroid Build Coastguard Worker field @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public static final String ACTION_REQUEST_DISABLE = "android.bluetooth.adapter.action.REQUEST_DISABLE"; 86*344a7f5eSAndroid Build Coastguard Worker field public static final int ACTIVE_DEVICE_ALL = 2; // 0x2 87*344a7f5eSAndroid Build Coastguard Worker field public static final int ACTIVE_DEVICE_AUDIO = 0; // 0x0 88*344a7f5eSAndroid Build Coastguard Worker field public static final int ACTIVE_DEVICE_PHONE_CALL = 1; // 0x1 89*344a7f5eSAndroid Build Coastguard Worker field public static final String EXTRA_RFCOMM_LISTENER_ID = "android.bluetooth.adapter.extra.RFCOMM_LISTENER_ID"; 90*344a7f5eSAndroid Build Coastguard Worker field public static final int STATE_BLE_ON = 15; // 0xf 91*344a7f5eSAndroid Build Coastguard Worker } 92*344a7f5eSAndroid Build Coastguard Worker 93*344a7f5eSAndroid Build Coastguard Worker public abstract static class BluetoothAdapter.BluetoothConnectionCallback { 94*344a7f5eSAndroid Build Coastguard Worker ctor public BluetoothAdapter.BluetoothConnectionCallback(); 95*344a7f5eSAndroid Build Coastguard Worker method @NonNull public static String disconnectReasonToString(int); 96*344a7f5eSAndroid Build Coastguard Worker method public void onDeviceConnected(@NonNull android.bluetooth.BluetoothDevice); 97*344a7f5eSAndroid Build Coastguard Worker method public void onDeviceDisconnected(@NonNull android.bluetooth.BluetoothDevice, int); 98*344a7f5eSAndroid Build Coastguard Worker } 99*344a7f5eSAndroid Build Coastguard Worker 100*344a7f5eSAndroid Build Coastguard Worker public static interface BluetoothAdapter.OnBluetoothActivityEnergyInfoCallback { 101*344a7f5eSAndroid Build Coastguard Worker method public void onBluetoothActivityEnergyInfoAvailable(@NonNull android.bluetooth.BluetoothActivityEnergyInfo); 102*344a7f5eSAndroid Build Coastguard Worker method public void onBluetoothActivityEnergyInfoError(int); 103*344a7f5eSAndroid Build Coastguard Worker } 104*344a7f5eSAndroid Build Coastguard Worker 105*344a7f5eSAndroid Build Coastguard Worker public static interface BluetoothAdapter.OnMetadataChangedListener { 106*344a7f5eSAndroid Build Coastguard Worker method public void onMetadataChanged(@NonNull android.bluetooth.BluetoothDevice, int, @Nullable byte[]); 107*344a7f5eSAndroid Build Coastguard Worker } 108*344a7f5eSAndroid Build Coastguard Worker 109*344a7f5eSAndroid Build Coastguard Worker public static interface BluetoothAdapter.OobDataCallback { 110*344a7f5eSAndroid Build Coastguard Worker method public void onError(int); 111*344a7f5eSAndroid Build Coastguard Worker method public void onOobData(int, @NonNull android.bluetooth.OobData); 112*344a7f5eSAndroid Build Coastguard Worker } 113*344a7f5eSAndroid Build Coastguard Worker 114*344a7f5eSAndroid Build Coastguard Worker public final class BluetoothClass implements android.os.Parcelable { 115*344a7f5eSAndroid Build Coastguard Worker field public static final int PROFILE_A2DP_SINK = 6; // 0x6 116*344a7f5eSAndroid Build Coastguard Worker field public static final int PROFILE_NAP = 5; // 0x5 117*344a7f5eSAndroid Build Coastguard Worker field public static final int PROFILE_OPP = 2; // 0x2 118*344a7f5eSAndroid Build Coastguard Worker field public static final int PROFILE_PANU = 4; // 0x4 119*344a7f5eSAndroid Build Coastguard Worker } 120*344a7f5eSAndroid Build Coastguard Worker 121*344a7f5eSAndroid Build Coastguard Worker public final class BluetoothCsipSetCoordinator implements java.lang.AutoCloseable android.bluetooth.BluetoothProfile { 122*344a7f5eSAndroid Build Coastguard Worker method @NonNull @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public java.util.List<java.lang.Integer> getAllGroupIds(@Nullable android.os.ParcelUuid); 123*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public int getConnectionPolicy(@Nullable android.bluetooth.BluetoothDevice); 124*344a7f5eSAndroid Build Coastguard Worker method @NonNull @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public java.util.Map<java.lang.Integer,android.os.ParcelUuid> getGroupUuidMapByDevice(@Nullable android.bluetooth.BluetoothDevice); 125*344a7f5eSAndroid Build Coastguard Worker method @Nullable @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public java.util.UUID lockGroup(int, @NonNull java.util.concurrent.Executor, @NonNull android.bluetooth.BluetoothCsipSetCoordinator.ClientLockCallback); 126*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public boolean setConnectionPolicy(@Nullable android.bluetooth.BluetoothDevice, int); 127*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public boolean unlockGroup(@NonNull java.util.UUID); 128*344a7f5eSAndroid Build Coastguard Worker field @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public static final String ACTION_CSIS_DEVICE_AVAILABLE = "android.bluetooth.action.CSIS_DEVICE_AVAILABLE"; 129*344a7f5eSAndroid Build Coastguard Worker field @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public static final String ACTION_CSIS_SET_MEMBER_AVAILABLE = "android.bluetooth.action.CSIS_SET_MEMBER_AVAILABLE"; 130*344a7f5eSAndroid Build Coastguard Worker field public static final String EXTRA_CSIS_GROUP_ID = "android.bluetooth.extra.CSIS_GROUP_ID"; 131*344a7f5eSAndroid Build Coastguard Worker field public static final int GROUP_ID_INVALID = -1; // 0xffffffff 132*344a7f5eSAndroid Build Coastguard Worker } 133*344a7f5eSAndroid Build Coastguard Worker 134*344a7f5eSAndroid Build Coastguard Worker public static interface BluetoothCsipSetCoordinator.ClientLockCallback { 135*344a7f5eSAndroid Build Coastguard Worker method public void onGroupLockSet(int, int, boolean); 136*344a7f5eSAndroid Build Coastguard Worker } 137*344a7f5eSAndroid Build Coastguard Worker 138*344a7f5eSAndroid Build Coastguard Worker public final class BluetoothDevice implements android.os.Parcelable { 139*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public boolean canBondWithoutDialog(); 140*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean cancelBondProcess(); 141*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED, android.Manifest.permission.MODIFY_PHONE_STATE}) public int connect(); 142*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean createBond(int); 143*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean createBondOutOfBand(int, @Nullable android.bluetooth.OobData, @Nullable android.bluetooth.OobData); 144*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public int disconnect(); 145*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public boolean fetchUuidsWithSdp(int); 146*344a7f5eSAndroid Build Coastguard Worker method @NonNull @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public String getAnonymizedAddress(); 147*344a7f5eSAndroid Build Coastguard Worker method @IntRange(from=0xffffff9c, to=100) @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public int getBatteryLevel(); 148*344a7f5eSAndroid Build Coastguard Worker method @Nullable @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public String getIdentityAddress(); 149*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public int getMessageAccessPermission(); 150*344a7f5eSAndroid Build Coastguard Worker method @Nullable @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public byte[] getMetadata(int); 151*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public int getPhonebookAccessPermission(); 152*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public int getSimAccessPermission(); 153*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean isBondingInitiatedLocally(); 154*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean isConnected(); 155*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean isEncrypted(); 156*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public boolean isInSilenceMode(); 157*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public void prepareToEnterProcess(@NonNull android.content.AttributionSource); 158*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean removeBond(); 159*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public boolean setLowLatencyAudioAllowed(boolean); 160*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public boolean setMessageAccessPermission(int); 161*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public boolean setMetadata(int, @NonNull byte[]); 162*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public boolean setPhonebookAccessPermission(int); 163*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean setPin(@NonNull String); 164*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public boolean setSilenceMode(boolean); 165*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public boolean setSimAccessPermission(int); 166*344a7f5eSAndroid Build Coastguard Worker field public static final int ACCESS_ALLOWED = 1; // 0x1 167*344a7f5eSAndroid Build Coastguard Worker field public static final int ACCESS_REJECTED = 2; // 0x2 168*344a7f5eSAndroid Build Coastguard Worker field public static final int ACCESS_UNKNOWN = 0; // 0x0 169*344a7f5eSAndroid Build Coastguard Worker field @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public static final String ACTION_BATTERY_LEVEL_CHANGED = "android.bluetooth.device.action.BATTERY_LEVEL_CHANGED"; 170*344a7f5eSAndroid Build Coastguard Worker field @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public static final String ACTION_CONNECTION_ACCESS_CANCEL = "android.bluetooth.device.action.CONNECTION_ACCESS_CANCEL"; 171*344a7f5eSAndroid Build Coastguard Worker field @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public static final String ACTION_CONNECTION_ACCESS_REPLY = "android.bluetooth.device.action.CONNECTION_ACCESS_REPLY"; 172*344a7f5eSAndroid Build Coastguard Worker field @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public static final String ACTION_CONNECTION_ACCESS_REQUEST = "android.bluetooth.device.action.CONNECTION_ACCESS_REQUEST"; 173*344a7f5eSAndroid Build Coastguard Worker field @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public static final String ACTION_PAIRING_CANCEL = "android.bluetooth.device.action.PAIRING_CANCEL"; 174*344a7f5eSAndroid Build Coastguard Worker field @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public static final String ACTION_SILENCE_MODE_CHANGED = "android.bluetooth.device.action.SILENCE_MODE_CHANGED"; 175*344a7f5eSAndroid Build Coastguard Worker field @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public static final String ACTION_SWITCH_BUFFER_SIZE = "android.bluetooth.device.action.SWITCH_BUFFER_SIZE"; 176*344a7f5eSAndroid Build Coastguard Worker field public static final int BATTERY_LEVEL_BLUETOOTH_OFF = -100; // 0xffffff9c 177*344a7f5eSAndroid Build Coastguard Worker field public static final int BATTERY_LEVEL_UNKNOWN = -1; // 0xffffffff 178*344a7f5eSAndroid Build Coastguard Worker field public static final int CONNECTION_ACCESS_NO = 2; // 0x2 179*344a7f5eSAndroid Build Coastguard Worker field public static final int CONNECTION_ACCESS_YES = 1; // 0x1 180*344a7f5eSAndroid Build Coastguard Worker field public static final String DEVICE_TYPE_DEFAULT = "Default"; 181*344a7f5eSAndroid Build Coastguard Worker field public static final String DEVICE_TYPE_UNTETHERED_HEADSET = "Untethered Headset"; 182*344a7f5eSAndroid Build Coastguard Worker field public static final String DEVICE_TYPE_WATCH = "Watch"; 183*344a7f5eSAndroid Build Coastguard Worker field public static final String EXTRA_ACCESS_REQUEST_TYPE = "android.bluetooth.device.extra.ACCESS_REQUEST_TYPE"; 184*344a7f5eSAndroid Build Coastguard Worker field public static final String EXTRA_ALWAYS_ALLOWED = "android.bluetooth.device.extra.ALWAYS_ALLOWED"; 185*344a7f5eSAndroid Build Coastguard Worker field public static final String EXTRA_BATTERY_LEVEL = "android.bluetooth.device.extra.BATTERY_LEVEL"; 186*344a7f5eSAndroid Build Coastguard Worker field public static final String EXTRA_CONNECTION_ACCESS_RESULT = "android.bluetooth.device.extra.CONNECTION_ACCESS_RESULT"; 187*344a7f5eSAndroid Build Coastguard Worker field public static final String EXTRA_LOW_LATENCY_BUFFER_SIZE = "android.bluetooth.device.extra.LOW_LATENCY_BUFFER_SIZE"; 188*344a7f5eSAndroid Build Coastguard Worker field public static final String EXTRA_PAIRING_INITIATOR = "android.bluetooth.device.extra.PAIRING_INITIATOR"; 189*344a7f5eSAndroid Build Coastguard Worker field public static final int EXTRA_PAIRING_INITIATOR_BACKGROUND = 2; // 0x2 190*344a7f5eSAndroid Build Coastguard Worker field public static final int EXTRA_PAIRING_INITIATOR_FOREGROUND = 1; // 0x1 191*344a7f5eSAndroid Build Coastguard Worker field public static final String EXTRA_UNBOND_REASON = "android.bluetooth.device.extra.REASON"; 192*344a7f5eSAndroid Build Coastguard Worker field public static final int METADATA_COMPANION_APP = 4; // 0x4 193*344a7f5eSAndroid Build Coastguard Worker field public static final int METADATA_DEVICE_TYPE = 17; // 0x11 194*344a7f5eSAndroid Build Coastguard Worker field public static final int METADATA_ENHANCED_SETTINGS_UI_URI = 16; // 0x10 195*344a7f5eSAndroid Build Coastguard Worker field public static final int METADATA_HARDWARE_VERSION = 3; // 0x3 196*344a7f5eSAndroid Build Coastguard Worker field public static final int METADATA_IS_UNTETHERED_HEADSET = 6; // 0x6 197*344a7f5eSAndroid Build Coastguard Worker field public static final int METADATA_MAIN_BATTERY = 18; // 0x12 198*344a7f5eSAndroid Build Coastguard Worker field public static final int METADATA_MAIN_CHARGING = 19; // 0x13 199*344a7f5eSAndroid Build Coastguard Worker field public static final int METADATA_MAIN_ICON = 5; // 0x5 200*344a7f5eSAndroid Build Coastguard Worker field public static final int METADATA_MAIN_LOW_BATTERY_THRESHOLD = 20; // 0x14 201*344a7f5eSAndroid Build Coastguard Worker field public static final int METADATA_MANUFACTURER_NAME = 0; // 0x0 202*344a7f5eSAndroid Build Coastguard Worker field public static final int METADATA_MAX_LENGTH = 2048; // 0x800 203*344a7f5eSAndroid Build Coastguard Worker field public static final int METADATA_MODEL_NAME = 1; // 0x1 204*344a7f5eSAndroid Build Coastguard Worker field public static final int METADATA_SOFTWARE_VERSION = 2; // 0x2 205*344a7f5eSAndroid Build Coastguard Worker field public static final int METADATA_UNTETHERED_CASE_BATTERY = 12; // 0xc 206*344a7f5eSAndroid Build Coastguard Worker field public static final int METADATA_UNTETHERED_CASE_CHARGING = 15; // 0xf 207*344a7f5eSAndroid Build Coastguard Worker field public static final int METADATA_UNTETHERED_CASE_ICON = 9; // 0x9 208*344a7f5eSAndroid Build Coastguard Worker field public static final int METADATA_UNTETHERED_CASE_LOW_BATTERY_THRESHOLD = 23; // 0x17 209*344a7f5eSAndroid Build Coastguard Worker field public static final int METADATA_UNTETHERED_LEFT_BATTERY = 10; // 0xa 210*344a7f5eSAndroid Build Coastguard Worker field public static final int METADATA_UNTETHERED_LEFT_CHARGING = 13; // 0xd 211*344a7f5eSAndroid Build Coastguard Worker field public static final int METADATA_UNTETHERED_LEFT_ICON = 7; // 0x7 212*344a7f5eSAndroid Build Coastguard Worker field public static final int METADATA_UNTETHERED_LEFT_LOW_BATTERY_THRESHOLD = 21; // 0x15 213*344a7f5eSAndroid Build Coastguard Worker field public static final int METADATA_UNTETHERED_RIGHT_BATTERY = 11; // 0xb 214*344a7f5eSAndroid Build Coastguard Worker field public static final int METADATA_UNTETHERED_RIGHT_CHARGING = 14; // 0xe 215*344a7f5eSAndroid Build Coastguard Worker field public static final int METADATA_UNTETHERED_RIGHT_ICON = 8; // 0x8 216*344a7f5eSAndroid Build Coastguard Worker field public static final int METADATA_UNTETHERED_RIGHT_LOW_BATTERY_THRESHOLD = 22; // 0x16 217*344a7f5eSAndroid Build Coastguard Worker field public static final int PAIRING_VARIANT_CONSENT = 3; // 0x3 218*344a7f5eSAndroid Build Coastguard Worker field public static final int PAIRING_VARIANT_DISPLAY_PASSKEY = 4; // 0x4 219*344a7f5eSAndroid Build Coastguard Worker field public static final int PAIRING_VARIANT_DISPLAY_PIN = 5; // 0x5 220*344a7f5eSAndroid Build Coastguard Worker field public static final int PAIRING_VARIANT_OOB_CONSENT = 6; // 0x6 221*344a7f5eSAndroid Build Coastguard Worker field public static final int PAIRING_VARIANT_PASSKEY = 1; // 0x1 222*344a7f5eSAndroid Build Coastguard Worker field public static final int PAIRING_VARIANT_PIN_16_DIGITS = 7; // 0x7 223*344a7f5eSAndroid Build Coastguard Worker field public static final int REQUEST_TYPE_MESSAGE_ACCESS = 3; // 0x3 224*344a7f5eSAndroid Build Coastguard Worker field public static final int REQUEST_TYPE_PHONEBOOK_ACCESS = 2; // 0x2 225*344a7f5eSAndroid Build Coastguard Worker field public static final int REQUEST_TYPE_PROFILE_CONNECTION = 1; // 0x1 226*344a7f5eSAndroid Build Coastguard Worker field public static final int REQUEST_TYPE_SIM_ACCESS = 4; // 0x4 227*344a7f5eSAndroid Build Coastguard Worker field public static final int UNBOND_REASON_AUTH_CANCELED = 3; // 0x3 228*344a7f5eSAndroid Build Coastguard Worker field public static final int UNBOND_REASON_AUTH_FAILED = 1; // 0x1 229*344a7f5eSAndroid Build Coastguard Worker field public static final int UNBOND_REASON_AUTH_REJECTED = 2; // 0x2 230*344a7f5eSAndroid Build Coastguard Worker field public static final int UNBOND_REASON_AUTH_TIMEOUT = 6; // 0x6 231*344a7f5eSAndroid Build Coastguard Worker field public static final int UNBOND_REASON_DISCOVERY_IN_PROGRESS = 5; // 0x5 232*344a7f5eSAndroid Build Coastguard Worker field public static final int UNBOND_REASON_REMOTE_AUTH_CANCELED = 8; // 0x8 233*344a7f5eSAndroid Build Coastguard Worker field public static final int UNBOND_REASON_REMOTE_DEVICE_DOWN = 4; // 0x4 234*344a7f5eSAndroid Build Coastguard Worker field public static final int UNBOND_REASON_REMOVED = 9; // 0x9 235*344a7f5eSAndroid Build Coastguard Worker field public static final int UNBOND_REASON_REPEATED_ATTEMPTS = 7; // 0x7 236*344a7f5eSAndroid Build Coastguard Worker } 237*344a7f5eSAndroid Build Coastguard Worker 238*344a7f5eSAndroid Build Coastguard Worker public interface BluetoothDevicePicker { 239*344a7f5eSAndroid Build Coastguard Worker field @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public static final String ACTION_DEVICE_SELECTED = "android.bluetooth.devicepicker.action.DEVICE_SELECTED"; 240*344a7f5eSAndroid Build Coastguard Worker field @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public static final String ACTION_LAUNCH = "android.bluetooth.devicepicker.action.LAUNCH"; 241*344a7f5eSAndroid Build Coastguard Worker field public static final String EXTRA_FILTER_TYPE = "android.bluetooth.devicepicker.extra.FILTER_TYPE"; 242*344a7f5eSAndroid Build Coastguard Worker field public static final String EXTRA_LAUNCH_CLASS = "android.bluetooth.devicepicker.extra.DEVICE_PICKER_LAUNCH_CLASS"; 243*344a7f5eSAndroid Build Coastguard Worker field public static final String EXTRA_LAUNCH_PACKAGE = "android.bluetooth.devicepicker.extra.LAUNCH_PACKAGE"; 244*344a7f5eSAndroid Build Coastguard Worker field public static final String EXTRA_NEED_AUTH = "android.bluetooth.devicepicker.extra.NEED_AUTH"; 245*344a7f5eSAndroid Build Coastguard Worker field public static final int FILTER_TYPE_ALL = 0; // 0x0 246*344a7f5eSAndroid Build Coastguard Worker field public static final int FILTER_TYPE_AUDIO = 1; // 0x1 247*344a7f5eSAndroid Build Coastguard Worker field public static final int FILTER_TYPE_NAP = 4; // 0x4 248*344a7f5eSAndroid Build Coastguard Worker field public static final int FILTER_TYPE_PANU = 3; // 0x3 249*344a7f5eSAndroid Build Coastguard Worker field public static final int FILTER_TYPE_TRANSFER = 2; // 0x2 250*344a7f5eSAndroid Build Coastguard Worker } 251*344a7f5eSAndroid Build Coastguard Worker 252*344a7f5eSAndroid Build Coastguard Worker public final class BluetoothHapClient implements java.lang.AutoCloseable android.bluetooth.BluetoothProfile { 253*344a7f5eSAndroid Build Coastguard Worker method @Nullable @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public android.bluetooth.BluetoothHapPresetInfo getActivePresetInfo(@NonNull android.bluetooth.BluetoothDevice); 254*344a7f5eSAndroid Build Coastguard Worker method @NonNull @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public java.util.List<android.bluetooth.BluetoothHapPresetInfo> getAllPresetInfo(@NonNull android.bluetooth.BluetoothDevice); 255*344a7f5eSAndroid Build Coastguard Worker method @NonNull @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public java.util.List<android.bluetooth.BluetoothDevice> getConnectedDevices(); 256*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public int getConnectionPolicy(@Nullable android.bluetooth.BluetoothDevice); 257*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public int getConnectionState(@NonNull android.bluetooth.BluetoothDevice); 258*344a7f5eSAndroid Build Coastguard Worker method @NonNull @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public java.util.List<android.bluetooth.BluetoothDevice> getDevicesMatchingConnectionStates(@NonNull int[]); 259*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public void registerCallback(@NonNull java.util.concurrent.Executor, @NonNull android.bluetooth.BluetoothHapClient.Callback); 260*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public void selectPreset(@NonNull android.bluetooth.BluetoothDevice, int); 261*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public void selectPresetForGroup(int, int); 262*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public boolean setConnectionPolicy(@NonNull android.bluetooth.BluetoothDevice, int); 263*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public void setPresetName(@NonNull android.bluetooth.BluetoothDevice, int, @NonNull String); 264*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public void setPresetNameForGroup(int, int, @NonNull String); 265*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public void unregisterCallback(@NonNull android.bluetooth.BluetoothHapClient.Callback); 266*344a7f5eSAndroid Build Coastguard Worker field @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public static final String ACTION_HAP_CONNECTION_STATE_CHANGED = "android.bluetooth.action.HAP_CONNECTION_STATE_CHANGED"; 267*344a7f5eSAndroid Build Coastguard Worker } 268*344a7f5eSAndroid Build Coastguard Worker 269*344a7f5eSAndroid Build Coastguard Worker public static interface BluetoothHapClient.Callback { 270*344a7f5eSAndroid Build Coastguard Worker method public void onPresetInfoChanged(@NonNull android.bluetooth.BluetoothDevice, @NonNull java.util.List<android.bluetooth.BluetoothHapPresetInfo>, int); 271*344a7f5eSAndroid Build Coastguard Worker method public void onPresetSelected(@NonNull android.bluetooth.BluetoothDevice, int, int); 272*344a7f5eSAndroid Build Coastguard Worker method public void onPresetSelectionFailed(@NonNull android.bluetooth.BluetoothDevice, int); 273*344a7f5eSAndroid Build Coastguard Worker method public void onPresetSelectionForGroupFailed(int, int); 274*344a7f5eSAndroid Build Coastguard Worker method public void onSetPresetNameFailed(@NonNull android.bluetooth.BluetoothDevice, int); 275*344a7f5eSAndroid Build Coastguard Worker method public void onSetPresetNameForGroupFailed(int, int); 276*344a7f5eSAndroid Build Coastguard Worker } 277*344a7f5eSAndroid Build Coastguard Worker 278*344a7f5eSAndroid Build Coastguard Worker public final class BluetoothHapPresetInfo implements android.os.Parcelable { 279*344a7f5eSAndroid Build Coastguard Worker method public int getIndex(); 280*344a7f5eSAndroid Build Coastguard Worker method @NonNull public String getName(); 281*344a7f5eSAndroid Build Coastguard Worker method public boolean isAvailable(); 282*344a7f5eSAndroid Build Coastguard Worker method public boolean isWritable(); 283*344a7f5eSAndroid Build Coastguard Worker method public void writeToParcel(@NonNull android.os.Parcel, int); 284*344a7f5eSAndroid Build Coastguard Worker field @NonNull public static final android.os.Parcelable.Creator<android.bluetooth.BluetoothHapPresetInfo> CREATOR; 285*344a7f5eSAndroid Build Coastguard Worker } 286*344a7f5eSAndroid Build Coastguard Worker 287*344a7f5eSAndroid Build Coastguard Worker public final class BluetoothHeadset implements android.bluetooth.BluetoothProfile { 288*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.MODIFY_PHONE_STATE}) public boolean connect(android.bluetooth.BluetoothDevice); 289*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public int connectAudio(); 290*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean disconnect(android.bluetooth.BluetoothDevice); 291*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public int disconnectAudio(); 292*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public int getAudioRouteAllowed(); 293*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public int getAudioState(@NonNull android.bluetooth.BluetoothDevice); 294*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public int getConnectionPolicy(@NonNull android.bluetooth.BluetoothDevice); 295*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public boolean isInbandRingingEnabled(); 296*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public int setAudioRouteAllowed(boolean); 297*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED, android.Manifest.permission.MODIFY_PHONE_STATE}) public boolean setConnectionPolicy(@NonNull android.bluetooth.BluetoothDevice, int); 298*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.MODIFY_PHONE_STATE, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public boolean startScoUsingVirtualVoiceCall(); 299*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.MODIFY_PHONE_STATE, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public boolean stopScoUsingVirtualVoiceCall(); 300*344a7f5eSAndroid Build Coastguard Worker field @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public static final String ACTION_ACTIVE_DEVICE_CHANGED = "android.bluetooth.headset.profile.action.ACTIVE_DEVICE_CHANGED"; 301*344a7f5eSAndroid Build Coastguard Worker } 302*344a7f5eSAndroid Build Coastguard Worker 303*344a7f5eSAndroid Build Coastguard Worker public final class BluetoothHeadsetClient implements java.lang.AutoCloseable android.bluetooth.BluetoothProfile { 304*344a7f5eSAndroid Build Coastguard Worker method @NonNull @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public java.util.List<android.bluetooth.BluetoothDevice> getConnectedDevices(); 305*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public int getConnectionPolicy(@NonNull android.bluetooth.BluetoothDevice); 306*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public int getConnectionState(@NonNull android.bluetooth.BluetoothDevice); 307*344a7f5eSAndroid Build Coastguard Worker method @NonNull @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public java.util.List<android.bluetooth.BluetoothDevice> getDevicesMatchingConnectionStates(@NonNull int[]); 308*344a7f5eSAndroid Build Coastguard Worker method @Nullable @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public android.bluetooth.BluetoothHeadsetClient.NetworkServiceState getNetworkServiceState(@NonNull android.bluetooth.BluetoothDevice); 309*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public boolean setConnectionPolicy(@NonNull android.bluetooth.BluetoothDevice, int); 310*344a7f5eSAndroid Build Coastguard Worker field @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public static final String ACTION_CONNECTION_STATE_CHANGED = "android.bluetooth.headsetclient.profile.action.CONNECTION_STATE_CHANGED"; 311*344a7f5eSAndroid Build Coastguard Worker field @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public static final String ACTION_NETWORK_SERVICE_STATE_CHANGED = "android.bluetooth.headsetclient.profile.action.NETWORK_SERVICE_STATE_CHANGED"; 312*344a7f5eSAndroid Build Coastguard Worker field public static final String EXTRA_NETWORK_SERVICE_STATE = "android.bluetooth.headsetclient.extra.EXTRA_NETWORK_SERVICE_STATE"; 313*344a7f5eSAndroid Build Coastguard Worker } 314*344a7f5eSAndroid Build Coastguard Worker 315*344a7f5eSAndroid Build Coastguard Worker public static final class BluetoothHeadsetClient.NetworkServiceState implements android.os.Parcelable { 316*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.bluetooth.BluetoothDevice getDevice(); 317*344a7f5eSAndroid Build Coastguard Worker method @Nullable public String getNetworkOperatorName(); 318*344a7f5eSAndroid Build Coastguard Worker method @IntRange(from=0, to=5) public int getSignalStrength(); 319*344a7f5eSAndroid Build Coastguard Worker method public boolean isRoaming(); 320*344a7f5eSAndroid Build Coastguard Worker method public boolean isServiceAvailable(); 321*344a7f5eSAndroid Build Coastguard Worker field @NonNull public static final android.os.Parcelable.Creator<android.bluetooth.BluetoothHeadsetClient.NetworkServiceState> CREATOR; 322*344a7f5eSAndroid Build Coastguard Worker } 323*344a7f5eSAndroid Build Coastguard Worker 324*344a7f5eSAndroid Build Coastguard Worker public final class BluetoothHearingAid implements android.bluetooth.BluetoothProfile { 325*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public int getConnectionPolicy(@NonNull android.bluetooth.BluetoothDevice); 326*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public long getHiSyncId(@NonNull android.bluetooth.BluetoothDevice); 327*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public boolean setConnectionPolicy(@NonNull android.bluetooth.BluetoothDevice, int); 328*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public void setVolume(int); 329*344a7f5eSAndroid Build Coastguard Worker field @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public static final String ACTION_ACTIVE_DEVICE_CHANGED = "android.bluetooth.hearingaid.profile.action.ACTIVE_DEVICE_CHANGED"; 330*344a7f5eSAndroid Build Coastguard Worker field public static final long HI_SYNC_ID_INVALID = 0L; // 0x0L 331*344a7f5eSAndroid Build Coastguard Worker } 332*344a7f5eSAndroid Build Coastguard Worker 333*344a7f5eSAndroid Build Coastguard Worker public final class BluetoothHidDevice implements android.bluetooth.BluetoothProfile { 334*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public boolean setConnectionPolicy(@NonNull android.bluetooth.BluetoothDevice, int); 335*344a7f5eSAndroid Build Coastguard Worker } 336*344a7f5eSAndroid Build Coastguard Worker 337*344a7f5eSAndroid Build Coastguard Worker public final class BluetoothHidHost implements android.bluetooth.BluetoothProfile { 338*344a7f5eSAndroid Build Coastguard Worker method @NonNull @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public java.util.List<android.bluetooth.BluetoothDevice> getConnectedDevices(); 339*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public int getConnectionPolicy(@NonNull android.bluetooth.BluetoothDevice); 340*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public int getConnectionState(@NonNull android.bluetooth.BluetoothDevice); 341*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public boolean setConnectionPolicy(@NonNull android.bluetooth.BluetoothDevice, int); 342*344a7f5eSAndroid Build Coastguard Worker field @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public static final String ACTION_CONNECTION_STATE_CHANGED = "android.bluetooth.input.profile.action.CONNECTION_STATE_CHANGED"; 343*344a7f5eSAndroid Build Coastguard Worker } 344*344a7f5eSAndroid Build Coastguard Worker 345*344a7f5eSAndroid Build Coastguard Worker public final class BluetoothLeAudio implements java.lang.AutoCloseable android.bluetooth.BluetoothProfile { 346*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public int getAudioLocation(@NonNull android.bluetooth.BluetoothDevice); 347*344a7f5eSAndroid Build Coastguard Worker method @Nullable @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public android.bluetooth.BluetoothLeAudioCodecStatus getCodecStatus(int); 348*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public int getConnectionPolicy(@Nullable android.bluetooth.BluetoothDevice); 349*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public void registerCallback(@NonNull java.util.concurrent.Executor, @NonNull android.bluetooth.BluetoothLeAudio.Callback); 350*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public void setCodecConfigPreference(int, @NonNull android.bluetooth.BluetoothLeAudioCodecConfig, @NonNull android.bluetooth.BluetoothLeAudioCodecConfig); 351*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public boolean setConnectionPolicy(@NonNull android.bluetooth.BluetoothDevice, int); 352*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public void setVolume(@IntRange(from=0, to=255) int); 353*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public void unregisterCallback(@NonNull android.bluetooth.BluetoothLeAudio.Callback); 354*344a7f5eSAndroid Build Coastguard Worker field @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public static final String ACTION_LE_AUDIO_ACTIVE_DEVICE_CHANGED = "android.bluetooth.action.LE_AUDIO_ACTIVE_DEVICE_CHANGED"; 355*344a7f5eSAndroid Build Coastguard Worker field public static final int AUDIO_LOCATION_BACK_CENTER = 256; // 0x100 356*344a7f5eSAndroid Build Coastguard Worker field public static final int AUDIO_LOCATION_BACK_LEFT = 16; // 0x10 357*344a7f5eSAndroid Build Coastguard Worker field public static final int AUDIO_LOCATION_BACK_RIGHT = 32; // 0x20 358*344a7f5eSAndroid Build Coastguard Worker field public static final int AUDIO_LOCATION_BOTTOM_FRONT_CENTER = 2097152; // 0x200000 359*344a7f5eSAndroid Build Coastguard Worker field public static final int AUDIO_LOCATION_BOTTOM_FRONT_LEFT = 4194304; // 0x400000 360*344a7f5eSAndroid Build Coastguard Worker field public static final int AUDIO_LOCATION_BOTTOM_FRONT_RIGHT = 8388608; // 0x800000 361*344a7f5eSAndroid Build Coastguard Worker field public static final int AUDIO_LOCATION_FRONT_CENTER = 4; // 0x4 362*344a7f5eSAndroid Build Coastguard Worker field public static final int AUDIO_LOCATION_FRONT_LEFT = 1; // 0x1 363*344a7f5eSAndroid Build Coastguard Worker field public static final int AUDIO_LOCATION_FRONT_LEFT_OF_CENTER = 64; // 0x40 364*344a7f5eSAndroid Build Coastguard Worker field public static final int AUDIO_LOCATION_FRONT_LEFT_WIDE = 16777216; // 0x1000000 365*344a7f5eSAndroid Build Coastguard Worker field public static final int AUDIO_LOCATION_FRONT_RIGHT = 2; // 0x2 366*344a7f5eSAndroid Build Coastguard Worker field public static final int AUDIO_LOCATION_FRONT_RIGHT_OF_CENTER = 128; // 0x80 367*344a7f5eSAndroid Build Coastguard Worker field public static final int AUDIO_LOCATION_FRONT_RIGHT_WIDE = 33554432; // 0x2000000 368*344a7f5eSAndroid Build Coastguard Worker field public static final int AUDIO_LOCATION_INVALID = 0; // 0x0 369*344a7f5eSAndroid Build Coastguard Worker field public static final int AUDIO_LOCATION_LEFT_SURROUND = 67108864; // 0x4000000 370*344a7f5eSAndroid Build Coastguard Worker field public static final int AUDIO_LOCATION_LOW_FREQ_EFFECTS_ONE = 8; // 0x8 371*344a7f5eSAndroid Build Coastguard Worker field public static final int AUDIO_LOCATION_LOW_FREQ_EFFECTS_TWO = 512; // 0x200 372*344a7f5eSAndroid Build Coastguard Worker field public static final int AUDIO_LOCATION_RIGHT_SURROUND = 134217728; // 0x8000000 373*344a7f5eSAndroid Build Coastguard Worker field public static final int AUDIO_LOCATION_SIDE_LEFT = 1024; // 0x400 374*344a7f5eSAndroid Build Coastguard Worker field public static final int AUDIO_LOCATION_SIDE_RIGHT = 2048; // 0x800 375*344a7f5eSAndroid Build Coastguard Worker field public static final int AUDIO_LOCATION_TOP_BACK_CENTER = 1048576; // 0x100000 376*344a7f5eSAndroid Build Coastguard Worker field public static final int AUDIO_LOCATION_TOP_BACK_LEFT = 65536; // 0x10000 377*344a7f5eSAndroid Build Coastguard Worker field public static final int AUDIO_LOCATION_TOP_BACK_RIGHT = 131072; // 0x20000 378*344a7f5eSAndroid Build Coastguard Worker field public static final int AUDIO_LOCATION_TOP_CENTER = 32768; // 0x8000 379*344a7f5eSAndroid Build Coastguard Worker field public static final int AUDIO_LOCATION_TOP_FRONT_CENTER = 16384; // 0x4000 380*344a7f5eSAndroid Build Coastguard Worker field public static final int AUDIO_LOCATION_TOP_FRONT_LEFT = 4096; // 0x1000 381*344a7f5eSAndroid Build Coastguard Worker field public static final int AUDIO_LOCATION_TOP_FRONT_RIGHT = 8192; // 0x2000 382*344a7f5eSAndroid Build Coastguard Worker field public static final int AUDIO_LOCATION_TOP_SIDE_LEFT = 262144; // 0x40000 383*344a7f5eSAndroid Build Coastguard Worker field public static final int AUDIO_LOCATION_TOP_SIDE_RIGHT = 524288; // 0x80000 384*344a7f5eSAndroid Build Coastguard Worker field public static final String EXTRA_LE_AUDIO_GROUP_ID = "android.bluetooth.extra.LE_AUDIO_GROUP_ID"; 385*344a7f5eSAndroid Build Coastguard Worker } 386*344a7f5eSAndroid Build Coastguard Worker 387*344a7f5eSAndroid Build Coastguard Worker public static interface BluetoothLeAudio.Callback { 388*344a7f5eSAndroid Build Coastguard Worker method public void onCodecConfigChanged(int, @NonNull android.bluetooth.BluetoothLeAudioCodecStatus); 389*344a7f5eSAndroid Build Coastguard Worker method public void onGroupNodeAdded(@NonNull android.bluetooth.BluetoothDevice, int); 390*344a7f5eSAndroid Build Coastguard Worker method public void onGroupNodeRemoved(@NonNull android.bluetooth.BluetoothDevice, int); 391*344a7f5eSAndroid Build Coastguard Worker method public void onGroupStatusChanged(int, int); 392*344a7f5eSAndroid Build Coastguard Worker } 393*344a7f5eSAndroid Build Coastguard Worker 394*344a7f5eSAndroid Build Coastguard Worker public final class BluetoothLeAudioCodecConfigMetadata implements android.os.Parcelable { 395*344a7f5eSAndroid Build Coastguard Worker method @NonNull public static android.bluetooth.BluetoothLeAudioCodecConfigMetadata fromRawBytes(@NonNull byte[]); 396*344a7f5eSAndroid Build Coastguard Worker method public long getAudioLocation(); 397*344a7f5eSAndroid Build Coastguard Worker method @NonNull public byte[] getRawMetadata(); 398*344a7f5eSAndroid Build Coastguard Worker field @NonNull public static final android.os.Parcelable.Creator<android.bluetooth.BluetoothLeAudioCodecConfigMetadata> CREATOR; 399*344a7f5eSAndroid Build Coastguard Worker } 400*344a7f5eSAndroid Build Coastguard Worker 401*344a7f5eSAndroid Build Coastguard Worker public static final class BluetoothLeAudioCodecConfigMetadata.Builder { 402*344a7f5eSAndroid Build Coastguard Worker ctor public BluetoothLeAudioCodecConfigMetadata.Builder(); 403*344a7f5eSAndroid Build Coastguard Worker ctor public BluetoothLeAudioCodecConfigMetadata.Builder(@NonNull android.bluetooth.BluetoothLeAudioCodecConfigMetadata); 404*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.bluetooth.BluetoothLeAudioCodecConfigMetadata build(); 405*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.bluetooth.BluetoothLeAudioCodecConfigMetadata.Builder setAudioLocation(long); 406*344a7f5eSAndroid Build Coastguard Worker } 407*344a7f5eSAndroid Build Coastguard Worker 408*344a7f5eSAndroid Build Coastguard Worker public final class BluetoothLeAudioContentMetadata implements android.os.Parcelable { 409*344a7f5eSAndroid Build Coastguard Worker method @NonNull public static android.bluetooth.BluetoothLeAudioContentMetadata fromRawBytes(@NonNull byte[]); 410*344a7f5eSAndroid Build Coastguard Worker method @Nullable public String getLanguage(); 411*344a7f5eSAndroid Build Coastguard Worker method @Nullable public String getProgramInfo(); 412*344a7f5eSAndroid Build Coastguard Worker method @NonNull public byte[] getRawMetadata(); 413*344a7f5eSAndroid Build Coastguard Worker field @NonNull public static final android.os.Parcelable.Creator<android.bluetooth.BluetoothLeAudioContentMetadata> CREATOR; 414*344a7f5eSAndroid Build Coastguard Worker } 415*344a7f5eSAndroid Build Coastguard Worker 416*344a7f5eSAndroid Build Coastguard Worker public static final class BluetoothLeAudioContentMetadata.Builder { 417*344a7f5eSAndroid Build Coastguard Worker ctor public BluetoothLeAudioContentMetadata.Builder(); 418*344a7f5eSAndroid Build Coastguard Worker ctor public BluetoothLeAudioContentMetadata.Builder(@NonNull android.bluetooth.BluetoothLeAudioContentMetadata); 419*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.bluetooth.BluetoothLeAudioContentMetadata build(); 420*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.bluetooth.BluetoothLeAudioContentMetadata.Builder setLanguage(@Nullable String); 421*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.bluetooth.BluetoothLeAudioContentMetadata.Builder setProgramInfo(@Nullable String); 422*344a7f5eSAndroid Build Coastguard Worker } 423*344a7f5eSAndroid Build Coastguard Worker 424*344a7f5eSAndroid Build Coastguard Worker public final class BluetoothLeBroadcast implements java.lang.AutoCloseable android.bluetooth.BluetoothProfile { 425*344a7f5eSAndroid Build Coastguard Worker method @NonNull @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public java.util.List<android.bluetooth.BluetoothLeBroadcastMetadata> getAllBroadcastMetadata(); 426*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public int getMaximumNumberOfBroadcasts(); 427*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public boolean isPlaying(int); 428*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public void registerCallback(@NonNull java.util.concurrent.Executor, @NonNull android.bluetooth.BluetoothLeBroadcast.Callback); 429*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public void startBroadcast(@NonNull android.bluetooth.BluetoothLeAudioContentMetadata, @Nullable byte[]); 430*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public void stopBroadcast(int); 431*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public void unregisterCallback(@NonNull android.bluetooth.BluetoothLeBroadcast.Callback); 432*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public void updateBroadcast(int, @NonNull android.bluetooth.BluetoothLeAudioContentMetadata); 433*344a7f5eSAndroid Build Coastguard Worker } 434*344a7f5eSAndroid Build Coastguard Worker 435*344a7f5eSAndroid Build Coastguard Worker public static interface BluetoothLeBroadcast.Callback { 436*344a7f5eSAndroid Build Coastguard Worker method public void onBroadcastMetadataChanged(int, @NonNull android.bluetooth.BluetoothLeBroadcastMetadata); 437*344a7f5eSAndroid Build Coastguard Worker method public void onBroadcastStartFailed(int); 438*344a7f5eSAndroid Build Coastguard Worker method public void onBroadcastStarted(int, int); 439*344a7f5eSAndroid Build Coastguard Worker method public void onBroadcastStopFailed(int); 440*344a7f5eSAndroid Build Coastguard Worker method public void onBroadcastStopped(int, int); 441*344a7f5eSAndroid Build Coastguard Worker method public void onBroadcastUpdateFailed(int, int); 442*344a7f5eSAndroid Build Coastguard Worker method public void onBroadcastUpdated(int, int); 443*344a7f5eSAndroid Build Coastguard Worker method public void onPlaybackStarted(int, int); 444*344a7f5eSAndroid Build Coastguard Worker method public void onPlaybackStopped(int, int); 445*344a7f5eSAndroid Build Coastguard Worker } 446*344a7f5eSAndroid Build Coastguard Worker 447*344a7f5eSAndroid Build Coastguard Worker public final class BluetoothLeBroadcastAssistant implements java.lang.AutoCloseable android.bluetooth.BluetoothProfile { 448*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public void addSource(@NonNull android.bluetooth.BluetoothDevice, @NonNull android.bluetooth.BluetoothLeBroadcastMetadata, boolean); 449*344a7f5eSAndroid Build Coastguard Worker method @NonNull @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public java.util.List<android.bluetooth.BluetoothLeBroadcastReceiveState> getAllSources(@NonNull android.bluetooth.BluetoothDevice); 450*344a7f5eSAndroid Build Coastguard Worker method @NonNull @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public java.util.List<android.bluetooth.BluetoothDevice> getConnectedDevices(); 451*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public int getConnectionPolicy(@NonNull android.bluetooth.BluetoothDevice); 452*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public int getConnectionState(@NonNull android.bluetooth.BluetoothDevice); 453*344a7f5eSAndroid Build Coastguard Worker method @NonNull @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public java.util.List<android.bluetooth.BluetoothDevice> getDevicesMatchingConnectionStates(@NonNull int[]); 454*344a7f5eSAndroid Build Coastguard Worker method public int getMaximumSourceCapacity(@NonNull android.bluetooth.BluetoothDevice); 455*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public boolean isSearchInProgress(); 456*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public void modifySource(@NonNull android.bluetooth.BluetoothDevice, int, @NonNull android.bluetooth.BluetoothLeBroadcastMetadata); 457*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public void registerCallback(@NonNull java.util.concurrent.Executor, @NonNull android.bluetooth.BluetoothLeBroadcastAssistant.Callback); 458*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public void removeSource(@NonNull android.bluetooth.BluetoothDevice, int); 459*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public boolean setConnectionPolicy(@NonNull android.bluetooth.BluetoothDevice, int); 460*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_SCAN, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public void startSearchingForSources(@NonNull java.util.List<android.bluetooth.le.ScanFilter>); 461*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public void stopSearchingForSources(); 462*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public void unregisterCallback(@NonNull android.bluetooth.BluetoothLeBroadcastAssistant.Callback); 463*344a7f5eSAndroid Build Coastguard Worker field @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public static final String ACTION_CONNECTION_STATE_CHANGED = "android.bluetooth.action.CONNECTION_STATE_CHANGED"; 464*344a7f5eSAndroid Build Coastguard Worker } 465*344a7f5eSAndroid Build Coastguard Worker 466*344a7f5eSAndroid Build Coastguard Worker public static interface BluetoothLeBroadcastAssistant.Callback { 467*344a7f5eSAndroid Build Coastguard Worker method public void onReceiveStateChanged(@NonNull android.bluetooth.BluetoothDevice, int, @NonNull android.bluetooth.BluetoothLeBroadcastReceiveState); 468*344a7f5eSAndroid Build Coastguard Worker method public void onSearchStartFailed(int); 469*344a7f5eSAndroid Build Coastguard Worker method public void onSearchStarted(int); 470*344a7f5eSAndroid Build Coastguard Worker method public void onSearchStopFailed(int); 471*344a7f5eSAndroid Build Coastguard Worker method public void onSearchStopped(int); 472*344a7f5eSAndroid Build Coastguard Worker method public void onSourceAddFailed(@NonNull android.bluetooth.BluetoothDevice, @NonNull android.bluetooth.BluetoothLeBroadcastMetadata, int); 473*344a7f5eSAndroid Build Coastguard Worker method public void onSourceAdded(@NonNull android.bluetooth.BluetoothDevice, int, int); 474*344a7f5eSAndroid Build Coastguard Worker method public void onSourceFound(@NonNull android.bluetooth.BluetoothLeBroadcastMetadata); 475*344a7f5eSAndroid Build Coastguard Worker method public void onSourceModified(@NonNull android.bluetooth.BluetoothDevice, int, int); 476*344a7f5eSAndroid Build Coastguard Worker method public void onSourceModifyFailed(@NonNull android.bluetooth.BluetoothDevice, int, int); 477*344a7f5eSAndroid Build Coastguard Worker method public void onSourceRemoveFailed(@NonNull android.bluetooth.BluetoothDevice, int, int); 478*344a7f5eSAndroid Build Coastguard Worker method public void onSourceRemoved(@NonNull android.bluetooth.BluetoothDevice, int, int); 479*344a7f5eSAndroid Build Coastguard Worker } 480*344a7f5eSAndroid Build Coastguard Worker 481*344a7f5eSAndroid Build Coastguard Worker public final class BluetoothLeBroadcastChannel implements android.os.Parcelable { 482*344a7f5eSAndroid Build Coastguard Worker method public int getChannelIndex(); 483*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.bluetooth.BluetoothLeAudioCodecConfigMetadata getCodecMetadata(); 484*344a7f5eSAndroid Build Coastguard Worker method public boolean isSelected(); 485*344a7f5eSAndroid Build Coastguard Worker field @NonNull public static final android.os.Parcelable.Creator<android.bluetooth.BluetoothLeBroadcastChannel> CREATOR; 486*344a7f5eSAndroid Build Coastguard Worker } 487*344a7f5eSAndroid Build Coastguard Worker 488*344a7f5eSAndroid Build Coastguard Worker public static final class BluetoothLeBroadcastChannel.Builder { 489*344a7f5eSAndroid Build Coastguard Worker ctor public BluetoothLeBroadcastChannel.Builder(); 490*344a7f5eSAndroid Build Coastguard Worker ctor public BluetoothLeBroadcastChannel.Builder(@NonNull android.bluetooth.BluetoothLeBroadcastChannel); 491*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.bluetooth.BluetoothLeBroadcastChannel build(); 492*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.bluetooth.BluetoothLeBroadcastChannel.Builder setChannelIndex(int); 493*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.bluetooth.BluetoothLeBroadcastChannel.Builder setCodecMetadata(@NonNull android.bluetooth.BluetoothLeAudioCodecConfigMetadata); 494*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.bluetooth.BluetoothLeBroadcastChannel.Builder setSelected(boolean); 495*344a7f5eSAndroid Build Coastguard Worker } 496*344a7f5eSAndroid Build Coastguard Worker 497*344a7f5eSAndroid Build Coastguard Worker public final class BluetoothLeBroadcastMetadata implements android.os.Parcelable { 498*344a7f5eSAndroid Build Coastguard Worker method @Nullable public byte[] getBroadcastCode(); 499*344a7f5eSAndroid Build Coastguard Worker method public int getBroadcastId(); 500*344a7f5eSAndroid Build Coastguard Worker method public int getPaSyncInterval(); 501*344a7f5eSAndroid Build Coastguard Worker method @IntRange(from=0, to=16777215) public int getPresentationDelayMicros(); 502*344a7f5eSAndroid Build Coastguard Worker method public int getSourceAddressType(); 503*344a7f5eSAndroid Build Coastguard Worker method public int getSourceAdvertisingSid(); 504*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.bluetooth.BluetoothDevice getSourceDevice(); 505*344a7f5eSAndroid Build Coastguard Worker method @NonNull public java.util.List<android.bluetooth.BluetoothLeBroadcastSubgroup> getSubgroups(); 506*344a7f5eSAndroid Build Coastguard Worker method public boolean isEncrypted(); 507*344a7f5eSAndroid Build Coastguard Worker field @NonNull public static final android.os.Parcelable.Creator<android.bluetooth.BluetoothLeBroadcastMetadata> CREATOR; 508*344a7f5eSAndroid Build Coastguard Worker field public static final int PA_SYNC_INTERVAL_UNKNOWN = 65535; // 0xffff 509*344a7f5eSAndroid Build Coastguard Worker } 510*344a7f5eSAndroid Build Coastguard Worker 511*344a7f5eSAndroid Build Coastguard Worker public static final class BluetoothLeBroadcastMetadata.Builder { 512*344a7f5eSAndroid Build Coastguard Worker ctor public BluetoothLeBroadcastMetadata.Builder(); 513*344a7f5eSAndroid Build Coastguard Worker ctor public BluetoothLeBroadcastMetadata.Builder(@NonNull android.bluetooth.BluetoothLeBroadcastMetadata); 514*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.bluetooth.BluetoothLeBroadcastMetadata.Builder addSubgroup(@NonNull android.bluetooth.BluetoothLeBroadcastSubgroup); 515*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.bluetooth.BluetoothLeBroadcastMetadata build(); 516*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.bluetooth.BluetoothLeBroadcastMetadata.Builder clearSubgroup(); 517*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.bluetooth.BluetoothLeBroadcastMetadata.Builder setBroadcastCode(@Nullable byte[]); 518*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.bluetooth.BluetoothLeBroadcastMetadata.Builder setBroadcastId(int); 519*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.bluetooth.BluetoothLeBroadcastMetadata.Builder setEncrypted(boolean); 520*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.bluetooth.BluetoothLeBroadcastMetadata.Builder setPaSyncInterval(int); 521*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.bluetooth.BluetoothLeBroadcastMetadata.Builder setPresentationDelayMicros(@IntRange(from=0, to=16777215) int); 522*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.bluetooth.BluetoothLeBroadcastMetadata.Builder setSourceAdvertisingSid(int); 523*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.bluetooth.BluetoothLeBroadcastMetadata.Builder setSourceDevice(@NonNull android.bluetooth.BluetoothDevice, int); 524*344a7f5eSAndroid Build Coastguard Worker } 525*344a7f5eSAndroid Build Coastguard Worker 526*344a7f5eSAndroid Build Coastguard Worker public final class BluetoothLeBroadcastReceiveState implements android.os.Parcelable { 527*344a7f5eSAndroid Build Coastguard Worker method @Nullable public byte[] getBadCode(); 528*344a7f5eSAndroid Build Coastguard Worker method public int getBigEncryptionState(); 529*344a7f5eSAndroid Build Coastguard Worker method @NonNull public java.util.List<java.lang.Long> getBisSyncState(); 530*344a7f5eSAndroid Build Coastguard Worker method public int getBroadcastId(); 531*344a7f5eSAndroid Build Coastguard Worker method public int getNumSubgroups(); 532*344a7f5eSAndroid Build Coastguard Worker method public int getPaSyncState(); 533*344a7f5eSAndroid Build Coastguard Worker method public int getSourceAddressType(); 534*344a7f5eSAndroid Build Coastguard Worker method public int getSourceAdvertisingSid(); 535*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.bluetooth.BluetoothDevice getSourceDevice(); 536*344a7f5eSAndroid Build Coastguard Worker method @IntRange(from=0, to=255) public int getSourceId(); 537*344a7f5eSAndroid Build Coastguard Worker method @NonNull public java.util.List<android.bluetooth.BluetoothLeAudioContentMetadata> getSubgroupMetadata(); 538*344a7f5eSAndroid Build Coastguard Worker field public static final int BIG_ENCRYPTION_STATE_BAD_CODE = 3; // 0x3 539*344a7f5eSAndroid Build Coastguard Worker field public static final int BIG_ENCRYPTION_STATE_CODE_REQUIRED = 1; // 0x1 540*344a7f5eSAndroid Build Coastguard Worker field public static final int BIG_ENCRYPTION_STATE_DECRYPTING = 2; // 0x2 541*344a7f5eSAndroid Build Coastguard Worker field public static final int BIG_ENCRYPTION_STATE_NOT_ENCRYPTED = 0; // 0x0 542*344a7f5eSAndroid Build Coastguard Worker field @NonNull public static final android.os.Parcelable.Creator<android.bluetooth.BluetoothLeBroadcastReceiveState> CREATOR; 543*344a7f5eSAndroid Build Coastguard Worker field public static final int PA_SYNC_STATE_FAILED_TO_SYNCHRONIZE = 3; // 0x3 544*344a7f5eSAndroid Build Coastguard Worker field public static final int PA_SYNC_STATE_IDLE = 0; // 0x0 545*344a7f5eSAndroid Build Coastguard Worker field public static final int PA_SYNC_STATE_NO_PAST = 4; // 0x4 546*344a7f5eSAndroid Build Coastguard Worker field public static final int PA_SYNC_STATE_SYNCHRONIZED = 2; // 0x2 547*344a7f5eSAndroid Build Coastguard Worker field public static final int PA_SYNC_STATE_SYNCINFO_REQUEST = 1; // 0x1 548*344a7f5eSAndroid Build Coastguard Worker } 549*344a7f5eSAndroid Build Coastguard Worker 550*344a7f5eSAndroid Build Coastguard Worker public final class BluetoothLeBroadcastSubgroup implements android.os.Parcelable { 551*344a7f5eSAndroid Build Coastguard Worker method @NonNull public java.util.List<android.bluetooth.BluetoothLeBroadcastChannel> getChannels(); 552*344a7f5eSAndroid Build Coastguard Worker method public long getCodecId(); 553*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.bluetooth.BluetoothLeAudioCodecConfigMetadata getCodecSpecificConfig(); 554*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.bluetooth.BluetoothLeAudioContentMetadata getContentMetadata(); 555*344a7f5eSAndroid Build Coastguard Worker method public boolean hasChannelPreference(); 556*344a7f5eSAndroid Build Coastguard Worker field @NonNull public static final android.os.Parcelable.Creator<android.bluetooth.BluetoothLeBroadcastSubgroup> CREATOR; 557*344a7f5eSAndroid Build Coastguard Worker } 558*344a7f5eSAndroid Build Coastguard Worker 559*344a7f5eSAndroid Build Coastguard Worker public static final class BluetoothLeBroadcastSubgroup.Builder { 560*344a7f5eSAndroid Build Coastguard Worker ctor public BluetoothLeBroadcastSubgroup.Builder(); 561*344a7f5eSAndroid Build Coastguard Worker ctor public BluetoothLeBroadcastSubgroup.Builder(@NonNull android.bluetooth.BluetoothLeBroadcastSubgroup); 562*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.bluetooth.BluetoothLeBroadcastSubgroup.Builder addChannel(@NonNull android.bluetooth.BluetoothLeBroadcastChannel); 563*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.bluetooth.BluetoothLeBroadcastSubgroup build(); 564*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.bluetooth.BluetoothLeBroadcastSubgroup.Builder clearChannel(); 565*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.bluetooth.BluetoothLeBroadcastSubgroup.Builder setCodecId(long); 566*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.bluetooth.BluetoothLeBroadcastSubgroup.Builder setCodecSpecificConfig(@NonNull android.bluetooth.BluetoothLeAudioCodecConfigMetadata); 567*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.bluetooth.BluetoothLeBroadcastSubgroup.Builder setContentMetadata(@NonNull android.bluetooth.BluetoothLeAudioContentMetadata); 568*344a7f5eSAndroid Build Coastguard Worker } 569*344a7f5eSAndroid Build Coastguard Worker 570*344a7f5eSAndroid Build Coastguard Worker public final class BluetoothMap implements java.lang.AutoCloseable android.bluetooth.BluetoothProfile { 571*344a7f5eSAndroid Build Coastguard Worker method public void close(); 572*344a7f5eSAndroid Build Coastguard Worker method protected void finalize(); 573*344a7f5eSAndroid Build Coastguard Worker method @NonNull @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public java.util.List<android.bluetooth.BluetoothDevice> getConnectedDevices(); 574*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public int getConnectionPolicy(@NonNull android.bluetooth.BluetoothDevice); 575*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public boolean setConnectionPolicy(@NonNull android.bluetooth.BluetoothDevice, int); 576*344a7f5eSAndroid Build Coastguard Worker field @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public static final String ACTION_CONNECTION_STATE_CHANGED = "android.bluetooth.map.profile.action.CONNECTION_STATE_CHANGED"; 577*344a7f5eSAndroid Build Coastguard Worker } 578*344a7f5eSAndroid Build Coastguard Worker 579*344a7f5eSAndroid Build Coastguard Worker public final class BluetoothMapClient implements java.lang.AutoCloseable android.bluetooth.BluetoothProfile { 580*344a7f5eSAndroid Build Coastguard Worker method @NonNull @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public java.util.List<android.bluetooth.BluetoothDevice> getConnectedDevices(); 581*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public int getConnectionPolicy(@NonNull android.bluetooth.BluetoothDevice); 582*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public int getConnectionState(@NonNull android.bluetooth.BluetoothDevice); 583*344a7f5eSAndroid Build Coastguard Worker method @NonNull @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public java.util.List<android.bluetooth.BluetoothDevice> getDevicesMatchingConnectionStates(@NonNull int[]); 584*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.SEND_SMS}) public boolean sendMessage(@NonNull android.bluetooth.BluetoothDevice, @NonNull java.util.Collection<android.net.Uri>, @NonNull String, @Nullable android.app.PendingIntent, @Nullable android.app.PendingIntent); 585*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public boolean setConnectionPolicy(@NonNull android.bluetooth.BluetoothDevice, int); 586*344a7f5eSAndroid Build Coastguard Worker field @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public static final String ACTION_CONNECTION_STATE_CHANGED = "android.bluetooth.mapmce.profile.action.CONNECTION_STATE_CHANGED"; 587*344a7f5eSAndroid Build Coastguard Worker } 588*344a7f5eSAndroid Build Coastguard Worker 589*344a7f5eSAndroid Build Coastguard Worker public final class BluetoothPan implements android.bluetooth.BluetoothProfile { 590*344a7f5eSAndroid Build Coastguard Worker method @NonNull @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public java.util.List<android.bluetooth.BluetoothDevice> getConnectedDevices(); 591*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public int getConnectionState(@NonNull android.bluetooth.BluetoothDevice); 592*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean isTetheringOn(); 593*344a7f5eSAndroid Build Coastguard Worker method @Deprecated @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED, android.Manifest.permission.TETHER_PRIVILEGED}) public void setBluetoothTethering(boolean); 594*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public boolean setConnectionPolicy(@NonNull android.bluetooth.BluetoothDevice, int); 595*344a7f5eSAndroid Build Coastguard Worker field @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public static final String ACTION_CONNECTION_STATE_CHANGED = "android.bluetooth.pan.profile.action.CONNECTION_STATE_CHANGED"; 596*344a7f5eSAndroid Build Coastguard Worker field public static final String ACTION_TETHERING_STATE_CHANGED = "android.bluetooth.action.TETHERING_STATE_CHANGED"; 597*344a7f5eSAndroid Build Coastguard Worker field public static final String EXTRA_LOCAL_ROLE = "android.bluetooth.pan.extra.LOCAL_ROLE"; 598*344a7f5eSAndroid Build Coastguard Worker field public static final String EXTRA_TETHERING_STATE = "android.bluetooth.extra.TETHERING_STATE"; 599*344a7f5eSAndroid Build Coastguard Worker field public static final int LOCAL_NAP_ROLE = 1; // 0x1 600*344a7f5eSAndroid Build Coastguard Worker field public static final int LOCAL_PANU_ROLE = 2; // 0x2 601*344a7f5eSAndroid Build Coastguard Worker field public static final int PAN_ROLE_NONE = 0; // 0x0 602*344a7f5eSAndroid Build Coastguard Worker field public static final int REMOTE_NAP_ROLE = 1; // 0x1 603*344a7f5eSAndroid Build Coastguard Worker field public static final int REMOTE_PANU_ROLE = 2; // 0x2 604*344a7f5eSAndroid Build Coastguard Worker field public static final int TETHERING_STATE_OFF = 1; // 0x1 605*344a7f5eSAndroid Build Coastguard Worker field public static final int TETHERING_STATE_ON = 2; // 0x2 606*344a7f5eSAndroid Build Coastguard Worker } 607*344a7f5eSAndroid Build Coastguard Worker 608*344a7f5eSAndroid Build Coastguard Worker public class BluetoothPbap implements android.bluetooth.BluetoothProfile { 609*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public int getConnectionState(@NonNull android.bluetooth.BluetoothDevice); 610*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public boolean setConnectionPolicy(@NonNull android.bluetooth.BluetoothDevice, int); 611*344a7f5eSAndroid Build Coastguard Worker field @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public static final String ACTION_CONNECTION_STATE_CHANGED = "android.bluetooth.pbap.profile.action.CONNECTION_STATE_CHANGED"; 612*344a7f5eSAndroid Build Coastguard Worker } 613*344a7f5eSAndroid Build Coastguard Worker 614*344a7f5eSAndroid Build Coastguard Worker public final class BluetoothPbapClient implements java.lang.AutoCloseable android.bluetooth.BluetoothProfile { 615*344a7f5eSAndroid Build Coastguard Worker method @NonNull @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public java.util.List<android.bluetooth.BluetoothDevice> getConnectedDevices(); 616*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public int getConnectionPolicy(@NonNull android.bluetooth.BluetoothDevice); 617*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public int getConnectionState(@NonNull android.bluetooth.BluetoothDevice); 618*344a7f5eSAndroid Build Coastguard Worker method @NonNull @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public java.util.List<android.bluetooth.BluetoothDevice> getDevicesMatchingConnectionStates(@NonNull int[]); 619*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public boolean setConnectionPolicy(@NonNull android.bluetooth.BluetoothDevice, int); 620*344a7f5eSAndroid Build Coastguard Worker field @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public static final String ACTION_CONNECTION_STATE_CHANGED = "android.bluetooth.pbapclient.profile.action.CONNECTION_STATE_CHANGED"; 621*344a7f5eSAndroid Build Coastguard Worker } 622*344a7f5eSAndroid Build Coastguard Worker 623*344a7f5eSAndroid Build Coastguard Worker public interface BluetoothProfile { 624*344a7f5eSAndroid Build Coastguard Worker method @NonNull public static String getConnectionStateName(int); 625*344a7f5eSAndroid Build Coastguard Worker method @NonNull public static String getProfileName(int); 626*344a7f5eSAndroid Build Coastguard Worker field public static final int A2DP_SINK = 11; // 0xb 627*344a7f5eSAndroid Build Coastguard Worker field public static final int AVRCP_CONTROLLER = 12; // 0xc 628*344a7f5eSAndroid Build Coastguard Worker field public static final int CONNECTION_POLICY_ALLOWED = 100; // 0x64 629*344a7f5eSAndroid Build Coastguard Worker field public static final int CONNECTION_POLICY_FORBIDDEN = 0; // 0x0 630*344a7f5eSAndroid Build Coastguard Worker field public static final int CONNECTION_POLICY_UNKNOWN = -1; // 0xffffffff 631*344a7f5eSAndroid Build Coastguard Worker field public static final int HEADSET_CLIENT = 16; // 0x10 632*344a7f5eSAndroid Build Coastguard Worker field public static final int HID_HOST = 4; // 0x4 633*344a7f5eSAndroid Build Coastguard Worker field public static final int LE_AUDIO_BROADCAST = 26; // 0x1a 634*344a7f5eSAndroid Build Coastguard Worker field public static final int LE_AUDIO_BROADCAST_ASSISTANT = 29; // 0x1d 635*344a7f5eSAndroid Build Coastguard Worker field public static final int MAP = 9; // 0x9 636*344a7f5eSAndroid Build Coastguard Worker field public static final int MAP_CLIENT = 18; // 0x12 637*344a7f5eSAndroid Build Coastguard Worker field public static final int OPP = 20; // 0x14 638*344a7f5eSAndroid Build Coastguard Worker field public static final int PAN = 5; // 0x5 639*344a7f5eSAndroid Build Coastguard Worker field public static final int PBAP = 6; // 0x6 640*344a7f5eSAndroid Build Coastguard Worker field public static final int PBAP_CLIENT = 17; // 0x11 641*344a7f5eSAndroid Build Coastguard Worker field @Deprecated public static final int PRIORITY_OFF = 0; // 0x0 642*344a7f5eSAndroid Build Coastguard Worker field @Deprecated public static final int PRIORITY_ON = 100; // 0x64 643*344a7f5eSAndroid Build Coastguard Worker field public static final int VOLUME_CONTROL = 23; // 0x17 644*344a7f5eSAndroid Build Coastguard Worker } 645*344a7f5eSAndroid Build Coastguard Worker 646*344a7f5eSAndroid Build Coastguard Worker public final class BluetoothSap implements java.lang.AutoCloseable android.bluetooth.BluetoothProfile { 647*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public int getConnectionPolicy(@NonNull android.bluetooth.BluetoothDevice); 648*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public boolean setConnectionPolicy(@NonNull android.bluetooth.BluetoothDevice, int); 649*344a7f5eSAndroid Build Coastguard Worker field @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public static final String ACTION_CONNECTION_STATE_CHANGED = "android.bluetooth.sap.profile.action.CONNECTION_STATE_CHANGED"; 650*344a7f5eSAndroid Build Coastguard Worker } 651*344a7f5eSAndroid Build Coastguard Worker 652*344a7f5eSAndroid Build Coastguard Worker public final class BluetoothStatusCodes { 653*344a7f5eSAndroid Build Coastguard Worker field public static final int ALLOWED = 400; // 0x190 654*344a7f5eSAndroid Build Coastguard Worker field public static final int ERROR_ALREADY_IN_TARGET_STATE = 26; // 0x1a 655*344a7f5eSAndroid Build Coastguard Worker field public static final int ERROR_ANOTHER_ACTIVE_OOB_REQUEST = 1000; // 0x3e8 656*344a7f5eSAndroid Build Coastguard Worker field public static final int ERROR_AUDIO_DEVICE_ALREADY_CONNECTED = 1116; // 0x45c 657*344a7f5eSAndroid Build Coastguard Worker field public static final int ERROR_AUDIO_DEVICE_ALREADY_DISCONNECTED = 1117; // 0x45d 658*344a7f5eSAndroid Build Coastguard Worker field public static final int ERROR_AUDIO_ROUTE_BLOCKED = 1118; // 0x45e 659*344a7f5eSAndroid Build Coastguard Worker field public static final int ERROR_BAD_PARAMETERS = 21; // 0x15 660*344a7f5eSAndroid Build Coastguard Worker field public static final int ERROR_CALL_ACTIVE = 1119; // 0x45f 661*344a7f5eSAndroid Build Coastguard Worker field public static final int ERROR_CSIP_GROUP_LOCKED_BY_OTHER = 1208; // 0x4b8 662*344a7f5eSAndroid Build Coastguard Worker field public static final int ERROR_CSIP_INVALID_GROUP_ID = 1207; // 0x4b7 663*344a7f5eSAndroid Build Coastguard Worker field public static final int ERROR_CSIP_LOCKED_GROUP_MEMBER_LOST = 1209; // 0x4b9 664*344a7f5eSAndroid Build Coastguard Worker field public static final int ERROR_HAP_INVALID_PRESET_INDEX = 1211; // 0x4bb 665*344a7f5eSAndroid Build Coastguard Worker field public static final int ERROR_HAP_PRESET_NAME_TOO_LONG = 1210; // 0x4ba 666*344a7f5eSAndroid Build Coastguard Worker field public static final int ERROR_HARDWARE_GENERIC = 20; // 0x14 667*344a7f5eSAndroid Build Coastguard Worker field public static final int ERROR_LE_BROADCAST_ASSISTANT_DUPLICATE_ADDITION = 1203; // 0x4b3 668*344a7f5eSAndroid Build Coastguard Worker field public static final int ERROR_LE_BROADCAST_ASSISTANT_INVALID_SOURCE_ID = 1202; // 0x4b2 669*344a7f5eSAndroid Build Coastguard Worker field public static final int ERROR_LE_BROADCAST_INVALID_BROADCAST_ID = 1200; // 0x4b0 670*344a7f5eSAndroid Build Coastguard Worker field public static final int ERROR_LE_BROADCAST_INVALID_CODE = 1201; // 0x4b1 671*344a7f5eSAndroid Build Coastguard Worker field public static final int ERROR_LE_CONTENT_METADATA_INVALID_LANGUAGE = 1205; // 0x4b5 672*344a7f5eSAndroid Build Coastguard Worker field public static final int ERROR_LE_CONTENT_METADATA_INVALID_OTHER = 1206; // 0x4b6 673*344a7f5eSAndroid Build Coastguard Worker field public static final int ERROR_LE_CONTENT_METADATA_INVALID_PROGRAM_INFO = 1204; // 0x4b4 674*344a7f5eSAndroid Build Coastguard Worker field public static final int ERROR_LOCAL_NOT_ENOUGH_RESOURCES = 22; // 0x16 675*344a7f5eSAndroid Build Coastguard Worker field public static final int ERROR_NOT_ACTIVE_DEVICE = 12; // 0xc 676*344a7f5eSAndroid Build Coastguard Worker field public static final int ERROR_NO_ACTIVE_DEVICES = 13; // 0xd 677*344a7f5eSAndroid Build Coastguard Worker field public static final int ERROR_PROFILE_NOT_CONNECTED = 14; // 0xe 678*344a7f5eSAndroid Build Coastguard Worker field public static final int ERROR_REMOTE_LINK_ERROR = 25; // 0x19 679*344a7f5eSAndroid Build Coastguard Worker field public static final int ERROR_REMOTE_NOT_ENOUGH_RESOURCES = 23; // 0x17 680*344a7f5eSAndroid Build Coastguard Worker field public static final int ERROR_REMOTE_OPERATION_NOT_SUPPORTED = 27; // 0x1b 681*344a7f5eSAndroid Build Coastguard Worker field public static final int ERROR_REMOTE_OPERATION_REJECTED = 24; // 0x18 682*344a7f5eSAndroid Build Coastguard Worker field public static final int ERROR_TIMEOUT = 15; // 0xf 683*344a7f5eSAndroid Build Coastguard Worker field public static final int NOT_ALLOWED = 401; // 0x191 684*344a7f5eSAndroid Build Coastguard Worker field public static final int REASON_LOCAL_APP_REQUEST = 16; // 0x10 685*344a7f5eSAndroid Build Coastguard Worker field public static final int REASON_LOCAL_STACK_REQUEST = 17; // 0x11 686*344a7f5eSAndroid Build Coastguard Worker field public static final int REASON_REMOTE_REQUEST = 18; // 0x12 687*344a7f5eSAndroid Build Coastguard Worker field public static final int REASON_SYSTEM_POLICY = 19; // 0x13 688*344a7f5eSAndroid Build Coastguard Worker field public static final int RFCOMM_LISTENER_FAILED_TO_CLOSE_SERVER_SOCKET = 2004; // 0x7d4 689*344a7f5eSAndroid Build Coastguard Worker field public static final int RFCOMM_LISTENER_FAILED_TO_CREATE_SERVER_SOCKET = 2003; // 0x7d3 690*344a7f5eSAndroid Build Coastguard Worker field public static final int RFCOMM_LISTENER_NO_SOCKET_AVAILABLE = 2005; // 0x7d5 691*344a7f5eSAndroid Build Coastguard Worker field public static final int RFCOMM_LISTENER_OPERATION_FAILED_DIFFERENT_APP = 2002; // 0x7d2 692*344a7f5eSAndroid Build Coastguard Worker field public static final int RFCOMM_LISTENER_OPERATION_FAILED_NO_MATCHING_SERVICE_RECORD = 2001; // 0x7d1 693*344a7f5eSAndroid Build Coastguard Worker field public static final int RFCOMM_LISTENER_START_FAILED_UUID_IN_USE = 2000; // 0x7d0 694*344a7f5eSAndroid Build Coastguard Worker } 695*344a7f5eSAndroid Build Coastguard Worker 696*344a7f5eSAndroid Build Coastguard Worker public final class BluetoothUuid { 697*344a7f5eSAndroid Build Coastguard Worker method public static boolean containsAnyUuid(@Nullable android.os.ParcelUuid[], @Nullable android.os.ParcelUuid[]); 698*344a7f5eSAndroid Build Coastguard Worker method @NonNull public static android.os.ParcelUuid parseUuidFrom(@Nullable byte[]); 699*344a7f5eSAndroid Build Coastguard Worker field @NonNull public static final android.os.ParcelUuid A2DP_SINK; 700*344a7f5eSAndroid Build Coastguard Worker field @NonNull public static final android.os.ParcelUuid A2DP_SOURCE; 701*344a7f5eSAndroid Build Coastguard Worker field @NonNull public static final android.os.ParcelUuid ADV_AUDIO_DIST; 702*344a7f5eSAndroid Build Coastguard Worker field @NonNull public static final android.os.ParcelUuid AVRCP; 703*344a7f5eSAndroid Build Coastguard Worker field @NonNull public static final android.os.ParcelUuid AVRCP_CONTROLLER; 704*344a7f5eSAndroid Build Coastguard Worker field @NonNull public static final android.os.ParcelUuid AVRCP_TARGET; 705*344a7f5eSAndroid Build Coastguard Worker field @NonNull public static final android.os.ParcelUuid BASE_UUID; 706*344a7f5eSAndroid Build Coastguard Worker field @NonNull public static final android.os.ParcelUuid BASS; 707*344a7f5eSAndroid Build Coastguard Worker field @NonNull public static final android.os.ParcelUuid BNEP; 708*344a7f5eSAndroid Build Coastguard Worker field @NonNull public static final android.os.ParcelUuid CAP; 709*344a7f5eSAndroid Build Coastguard Worker field @NonNull public static final android.os.ParcelUuid COORDINATED_SET; 710*344a7f5eSAndroid Build Coastguard Worker field @NonNull public static final android.os.ParcelUuid DIP; 711*344a7f5eSAndroid Build Coastguard Worker field @NonNull public static final android.os.ParcelUuid GENERIC_MEDIA_CONTROL; 712*344a7f5eSAndroid Build Coastguard Worker field @NonNull public static final android.os.ParcelUuid HAS; 713*344a7f5eSAndroid Build Coastguard Worker field @NonNull public static final android.os.ParcelUuid HEARING_AID; 714*344a7f5eSAndroid Build Coastguard Worker field @NonNull public static final android.os.ParcelUuid HFP; 715*344a7f5eSAndroid Build Coastguard Worker field @NonNull public static final android.os.ParcelUuid HFP_AG; 716*344a7f5eSAndroid Build Coastguard Worker field @NonNull public static final android.os.ParcelUuid HID; 717*344a7f5eSAndroid Build Coastguard Worker field @NonNull public static final android.os.ParcelUuid HOGP; 718*344a7f5eSAndroid Build Coastguard Worker field @NonNull public static final android.os.ParcelUuid HSP; 719*344a7f5eSAndroid Build Coastguard Worker field @NonNull public static final android.os.ParcelUuid HSP_AG; 720*344a7f5eSAndroid Build Coastguard Worker field @NonNull public static final android.os.ParcelUuid LE_AUDIO; 721*344a7f5eSAndroid Build Coastguard Worker field @NonNull public static final android.os.ParcelUuid MAP; 722*344a7f5eSAndroid Build Coastguard Worker field @NonNull public static final android.os.ParcelUuid MAS; 723*344a7f5eSAndroid Build Coastguard Worker field @NonNull public static final android.os.ParcelUuid MEDIA_CONTROL; 724*344a7f5eSAndroid Build Coastguard Worker field @NonNull public static final android.os.ParcelUuid MNS; 725*344a7f5eSAndroid Build Coastguard Worker field @NonNull public static final android.os.ParcelUuid NAP; 726*344a7f5eSAndroid Build Coastguard Worker field @NonNull public static final android.os.ParcelUuid OBEX_OBJECT_PUSH; 727*344a7f5eSAndroid Build Coastguard Worker field @NonNull public static final android.os.ParcelUuid PANU; 728*344a7f5eSAndroid Build Coastguard Worker field @NonNull public static final android.os.ParcelUuid PBAP_PCE; 729*344a7f5eSAndroid Build Coastguard Worker field @NonNull public static final android.os.ParcelUuid PBAP_PSE; 730*344a7f5eSAndroid Build Coastguard Worker field @NonNull public static final android.os.ParcelUuid SAP; 731*344a7f5eSAndroid Build Coastguard Worker field public static final int UUID_BYTES_128_BIT = 16; // 0x10 732*344a7f5eSAndroid Build Coastguard Worker field public static final int UUID_BYTES_16_BIT = 2; // 0x2 733*344a7f5eSAndroid Build Coastguard Worker field public static final int UUID_BYTES_32_BIT = 4; // 0x4 734*344a7f5eSAndroid Build Coastguard Worker field @NonNull public static final android.os.ParcelUuid VOLUME_CONTROL; 735*344a7f5eSAndroid Build Coastguard Worker } 736*344a7f5eSAndroid Build Coastguard Worker 737*344a7f5eSAndroid Build Coastguard Worker public final class BluetoothVolumeControl implements java.lang.AutoCloseable android.bluetooth.BluetoothProfile { 738*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public void close(); 739*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) protected void finalize(); 740*344a7f5eSAndroid Build Coastguard Worker method @NonNull @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public java.util.List<android.bluetooth.BluetoothDevice> getConnectedDevices(); 741*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public int getConnectionPolicy(@NonNull android.bluetooth.BluetoothDevice); 742*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public boolean isVolumeOffsetAvailable(@NonNull android.bluetooth.BluetoothDevice); 743*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public void registerCallback(@NonNull java.util.concurrent.Executor, @NonNull android.bluetooth.BluetoothVolumeControl.Callback); 744*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public boolean setConnectionPolicy(@NonNull android.bluetooth.BluetoothDevice, int); 745*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public void setVolumeOffset(@NonNull android.bluetooth.BluetoothDevice, @IntRange(from=0xffffff01, to=255) int); 746*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public void unregisterCallback(@NonNull android.bluetooth.BluetoothVolumeControl.Callback); 747*344a7f5eSAndroid Build Coastguard Worker field @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public static final String ACTION_CONNECTION_STATE_CHANGED = "android.bluetooth.volume-control.profile.action.CONNECTION_STATE_CHANGED"; 748*344a7f5eSAndroid Build Coastguard Worker } 749*344a7f5eSAndroid Build Coastguard Worker 750*344a7f5eSAndroid Build Coastguard Worker public static interface BluetoothVolumeControl.Callback { 751*344a7f5eSAndroid Build Coastguard Worker method public void onVolumeOffsetChanged(@NonNull android.bluetooth.BluetoothDevice, @IntRange(from=0xffffff01, to=255) int); 752*344a7f5eSAndroid Build Coastguard Worker } 753*344a7f5eSAndroid Build Coastguard Worker 754*344a7f5eSAndroid Build Coastguard Worker public final class BufferConstraint implements android.os.Parcelable { 755*344a7f5eSAndroid Build Coastguard Worker ctor public BufferConstraint(int, int, int); 756*344a7f5eSAndroid Build Coastguard Worker method public int describeContents(); 757*344a7f5eSAndroid Build Coastguard Worker method public int getDefaultMillis(); 758*344a7f5eSAndroid Build Coastguard Worker method public int getMaxMillis(); 759*344a7f5eSAndroid Build Coastguard Worker method public int getMinMillis(); 760*344a7f5eSAndroid Build Coastguard Worker method public void writeToParcel(@NonNull android.os.Parcel, int); 761*344a7f5eSAndroid Build Coastguard Worker field @NonNull public static final android.os.Parcelable.Creator<android.bluetooth.BufferConstraint> CREATOR; 762*344a7f5eSAndroid Build Coastguard Worker } 763*344a7f5eSAndroid Build Coastguard Worker 764*344a7f5eSAndroid Build Coastguard Worker public final class BufferConstraints implements android.os.Parcelable { 765*344a7f5eSAndroid Build Coastguard Worker ctor public BufferConstraints(@NonNull java.util.List<android.bluetooth.BufferConstraint>); 766*344a7f5eSAndroid Build Coastguard Worker method public int describeContents(); 767*344a7f5eSAndroid Build Coastguard Worker method @Nullable public android.bluetooth.BufferConstraint forCodec(int); 768*344a7f5eSAndroid Build Coastguard Worker method public void writeToParcel(@NonNull android.os.Parcel, int); 769*344a7f5eSAndroid Build Coastguard Worker field public static final int BUFFER_CODEC_MAX_NUM = 32; // 0x20 770*344a7f5eSAndroid Build Coastguard Worker field @NonNull public static final android.os.Parcelable.Creator<android.bluetooth.BufferConstraints> CREATOR; 771*344a7f5eSAndroid Build Coastguard Worker } 772*344a7f5eSAndroid Build Coastguard Worker 773*344a7f5eSAndroid Build Coastguard Worker public final class OobData implements android.os.Parcelable { 774*344a7f5eSAndroid Build Coastguard Worker method @NonNull public byte[] getClassOfDevice(); 775*344a7f5eSAndroid Build Coastguard Worker method @NonNull public byte[] getClassicLength(); 776*344a7f5eSAndroid Build Coastguard Worker method @NonNull public byte[] getConfirmationHash(); 777*344a7f5eSAndroid Build Coastguard Worker method @NonNull public byte[] getDeviceAddressWithType(); 778*344a7f5eSAndroid Build Coastguard Worker method @Nullable public byte[] getDeviceName(); 779*344a7f5eSAndroid Build Coastguard Worker method @Nullable public byte[] getLeAppearance(); 780*344a7f5eSAndroid Build Coastguard Worker method @NonNull public int getLeDeviceRole(); 781*344a7f5eSAndroid Build Coastguard Worker method @NonNull public int getLeFlags(); 782*344a7f5eSAndroid Build Coastguard Worker method @Nullable public byte[] getLeTemporaryKey(); 783*344a7f5eSAndroid Build Coastguard Worker method @NonNull public byte[] getRandomizerHash(); 784*344a7f5eSAndroid Build Coastguard Worker field public static final int CLASS_OF_DEVICE_OCTETS = 3; // 0x3 785*344a7f5eSAndroid Build Coastguard Worker field public static final int CONFIRMATION_OCTETS = 16; // 0x10 786*344a7f5eSAndroid Build Coastguard Worker field @NonNull public static final android.os.Parcelable.Creator<android.bluetooth.OobData> CREATOR; 787*344a7f5eSAndroid Build Coastguard Worker field public static final int DEVICE_ADDRESS_OCTETS = 7; // 0x7 788*344a7f5eSAndroid Build Coastguard Worker field public static final int LE_APPEARANCE_OCTETS = 2; // 0x2 789*344a7f5eSAndroid Build Coastguard Worker field public static final int LE_DEVICE_FLAG_OCTETS = 1; // 0x1 790*344a7f5eSAndroid Build Coastguard Worker field public static final int LE_DEVICE_ROLE_BOTH_PREFER_CENTRAL = 3; // 0x3 791*344a7f5eSAndroid Build Coastguard Worker field public static final int LE_DEVICE_ROLE_BOTH_PREFER_PERIPHERAL = 2; // 0x2 792*344a7f5eSAndroid Build Coastguard Worker field public static final int LE_DEVICE_ROLE_CENTRAL_ONLY = 1; // 0x1 793*344a7f5eSAndroid Build Coastguard Worker field public static final int LE_DEVICE_ROLE_OCTETS = 1; // 0x1 794*344a7f5eSAndroid Build Coastguard Worker field public static final int LE_DEVICE_ROLE_PERIPHERAL_ONLY = 0; // 0x0 795*344a7f5eSAndroid Build Coastguard Worker field public static final int LE_FLAG_BREDR_NOT_SUPPORTED = 2; // 0x2 796*344a7f5eSAndroid Build Coastguard Worker field public static final int LE_FLAG_GENERAL_DISCOVERY_MODE = 1; // 0x1 797*344a7f5eSAndroid Build Coastguard Worker field public static final int LE_FLAG_LIMITED_DISCOVERY_MODE = 0; // 0x0 798*344a7f5eSAndroid Build Coastguard Worker field public static final int LE_FLAG_SIMULTANEOUS_CONTROLLER = 3; // 0x3 799*344a7f5eSAndroid Build Coastguard Worker field public static final int LE_FLAG_SIMULTANEOUS_HOST = 4; // 0x4 800*344a7f5eSAndroid Build Coastguard Worker field public static final int LE_TK_OCTETS = 16; // 0x10 801*344a7f5eSAndroid Build Coastguard Worker field public static final int OOB_LENGTH_OCTETS = 2; // 0x2 802*344a7f5eSAndroid Build Coastguard Worker field public static final int RANDOMIZER_OCTETS = 16; // 0x10 803*344a7f5eSAndroid Build Coastguard Worker } 804*344a7f5eSAndroid Build Coastguard Worker 805*344a7f5eSAndroid Build Coastguard Worker public static final class OobData.ClassicBuilder { 806*344a7f5eSAndroid Build Coastguard Worker ctor public OobData.ClassicBuilder(@NonNull byte[], @NonNull byte[], @NonNull byte[]); 807*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.bluetooth.OobData build(); 808*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.bluetooth.OobData.ClassicBuilder setClassOfDevice(@NonNull byte[]); 809*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.bluetooth.OobData.ClassicBuilder setDeviceName(@NonNull byte[]); 810*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.bluetooth.OobData.ClassicBuilder setRandomizerHash(@NonNull byte[]); 811*344a7f5eSAndroid Build Coastguard Worker } 812*344a7f5eSAndroid Build Coastguard Worker 813*344a7f5eSAndroid Build Coastguard Worker public static final class OobData.LeBuilder { 814*344a7f5eSAndroid Build Coastguard Worker ctor public OobData.LeBuilder(@NonNull byte[], @NonNull byte[], int); 815*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.bluetooth.OobData build(); 816*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.bluetooth.OobData.LeBuilder setDeviceName(@NonNull byte[]); 817*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.bluetooth.OobData.LeBuilder setLeFlags(int); 818*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.bluetooth.OobData.LeBuilder setLeTemporaryKey(@NonNull byte[]); 819*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.bluetooth.OobData.LeBuilder setRandomizerHash(@NonNull byte[]); 820*344a7f5eSAndroid Build Coastguard Worker } 821*344a7f5eSAndroid Build Coastguard Worker 822*344a7f5eSAndroid Build Coastguard Worker public final class UidTraffic implements java.lang.Cloneable android.os.Parcelable { 823*344a7f5eSAndroid Build Coastguard Worker method public long getRxBytes(); 824*344a7f5eSAndroid Build Coastguard Worker method public long getTxBytes(); 825*344a7f5eSAndroid Build Coastguard Worker method public int getUid(); 826*344a7f5eSAndroid Build Coastguard Worker field @NonNull public static final android.os.Parcelable.Creator<android.bluetooth.UidTraffic> CREATOR; 827*344a7f5eSAndroid Build Coastguard Worker } 828*344a7f5eSAndroid Build Coastguard Worker 829*344a7f5eSAndroid Build Coastguard Worker} 830*344a7f5eSAndroid Build Coastguard Worker 831*344a7f5eSAndroid Build Coastguard Workerpackage android.bluetooth.le { 832*344a7f5eSAndroid Build Coastguard Worker 833*344a7f5eSAndroid Build Coastguard Worker public final class AdvertiseSettings implements android.os.Parcelable { 834*344a7f5eSAndroid Build Coastguard Worker method public int getOwnAddressType(); 835*344a7f5eSAndroid Build Coastguard Worker } 836*344a7f5eSAndroid Build Coastguard Worker 837*344a7f5eSAndroid Build Coastguard Worker public static final class AdvertiseSettings.Builder { 838*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.bluetooth.le.AdvertiseSettings.Builder setOwnAddressType(int); 839*344a7f5eSAndroid Build Coastguard Worker } 840*344a7f5eSAndroid Build Coastguard Worker 841*344a7f5eSAndroid Build Coastguard Worker public final class AdvertisingSetParameters implements android.os.Parcelable { 842*344a7f5eSAndroid Build Coastguard Worker method public int getOwnAddressType(); 843*344a7f5eSAndroid Build Coastguard Worker field public static final int ADDRESS_TYPE_DEFAULT = -1; // 0xffffffff 844*344a7f5eSAndroid Build Coastguard Worker field public static final int ADDRESS_TYPE_PUBLIC = 0; // 0x0 845*344a7f5eSAndroid Build Coastguard Worker field public static final int ADDRESS_TYPE_RANDOM = 1; // 0x1 846*344a7f5eSAndroid Build Coastguard Worker } 847*344a7f5eSAndroid Build Coastguard Worker 848*344a7f5eSAndroid Build Coastguard Worker public static final class AdvertisingSetParameters.Builder { 849*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.bluetooth.le.AdvertisingSetParameters.Builder setOwnAddressType(int); 850*344a7f5eSAndroid Build Coastguard Worker } 851*344a7f5eSAndroid Build Coastguard Worker 852*344a7f5eSAndroid Build Coastguard Worker public final class BluetoothLeScanner { 853*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_SCAN, android.Manifest.permission.UPDATE_DEVICE_STATS}) public void startScanFromSource(android.os.WorkSource, android.bluetooth.le.ScanCallback); 854*344a7f5eSAndroid Build Coastguard Worker method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_SCAN, android.Manifest.permission.UPDATE_DEVICE_STATS}) public void startScanFromSource(java.util.List<android.bluetooth.le.ScanFilter>, android.bluetooth.le.ScanSettings, android.os.WorkSource, android.bluetooth.le.ScanCallback); 855*344a7f5eSAndroid Build Coastguard Worker method @Deprecated @RequiresPermission(android.Manifest.permission.BLUETOOTH_SCAN) public void startTruncatedScan(java.util.List<android.bluetooth.le.TruncatedFilter>, android.bluetooth.le.ScanSettings, android.bluetooth.le.ScanCallback); 856*344a7f5eSAndroid Build Coastguard Worker } 857*344a7f5eSAndroid Build Coastguard Worker 858*344a7f5eSAndroid Build Coastguard Worker @Deprecated public final class ResultStorageDescriptor implements android.os.Parcelable { 859*344a7f5eSAndroid Build Coastguard Worker ctor @Deprecated public ResultStorageDescriptor(int, int, int); 860*344a7f5eSAndroid Build Coastguard Worker method @Deprecated public int describeContents(); 861*344a7f5eSAndroid Build Coastguard Worker method @Deprecated public int getLength(); 862*344a7f5eSAndroid Build Coastguard Worker method @Deprecated public int getOffset(); 863*344a7f5eSAndroid Build Coastguard Worker method @Deprecated public int getType(); 864*344a7f5eSAndroid Build Coastguard Worker method @Deprecated public void writeToParcel(android.os.Parcel, int); 865*344a7f5eSAndroid Build Coastguard Worker field @Deprecated @NonNull public static final android.os.Parcelable.Creator<android.bluetooth.le.ResultStorageDescriptor> CREATOR; 866*344a7f5eSAndroid Build Coastguard Worker } 867*344a7f5eSAndroid Build Coastguard Worker 868*344a7f5eSAndroid Build Coastguard Worker public final class ScanFilter implements android.os.Parcelable { 869*344a7f5eSAndroid Build Coastguard Worker method public int getAddressType(); 870*344a7f5eSAndroid Build Coastguard Worker method @Nullable public byte[] getIrk(); 871*344a7f5eSAndroid Build Coastguard Worker } 872*344a7f5eSAndroid Build Coastguard Worker 873*344a7f5eSAndroid Build Coastguard Worker public static final class ScanFilter.Builder { 874*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.bluetooth.le.ScanFilter.Builder setDeviceAddress(@NonNull String, int); 875*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.bluetooth.le.ScanFilter.Builder setDeviceAddress(@NonNull String, int, @NonNull byte[]); 876*344a7f5eSAndroid Build Coastguard Worker field public static final int LEN_IRK_OCTETS = 16; // 0x10 877*344a7f5eSAndroid Build Coastguard Worker } 878*344a7f5eSAndroid Build Coastguard Worker 879*344a7f5eSAndroid Build Coastguard Worker public final class ScanSettings implements android.os.Parcelable { 880*344a7f5eSAndroid Build Coastguard Worker field public static final int SCAN_MODE_AMBIENT_DISCOVERY = 3; // 0x3 881*344a7f5eSAndroid Build Coastguard Worker field public static final int SCAN_RESULT_TYPE_ABBREVIATED = 1; // 0x1 882*344a7f5eSAndroid Build Coastguard Worker field public static final int SCAN_RESULT_TYPE_FULL = 0; // 0x0 883*344a7f5eSAndroid Build Coastguard Worker } 884*344a7f5eSAndroid Build Coastguard Worker 885*344a7f5eSAndroid Build Coastguard Worker public static final class ScanSettings.Builder { 886*344a7f5eSAndroid Build Coastguard Worker method public android.bluetooth.le.ScanSettings.Builder setScanResultType(int); 887*344a7f5eSAndroid Build Coastguard Worker } 888*344a7f5eSAndroid Build Coastguard Worker 889*344a7f5eSAndroid Build Coastguard Worker @Deprecated public final class TruncatedFilter { 890*344a7f5eSAndroid Build Coastguard Worker ctor @Deprecated public TruncatedFilter(android.bluetooth.le.ScanFilter, java.util.List<android.bluetooth.le.ResultStorageDescriptor>); 891*344a7f5eSAndroid Build Coastguard Worker method @Deprecated public android.bluetooth.le.ScanFilter getFilter(); 892*344a7f5eSAndroid Build Coastguard Worker method @Deprecated public java.util.List<android.bluetooth.le.ResultStorageDescriptor> getStorageDescriptors(); 893*344a7f5eSAndroid Build Coastguard Worker } 894*344a7f5eSAndroid Build Coastguard Worker 895*344a7f5eSAndroid Build Coastguard Worker} 896*344a7f5eSAndroid Build Coastguard Worker 897