Loading android/app/src/com/android/bluetooth/btservice/AdapterService.java +2 −0 Original line number Diff line number Diff line Loading @@ -2161,6 +2161,8 @@ public class AdapterService extends Service { return false; } enforceBluetoothPrivilegedPermission(service); DeviceProperties deviceProp = service.mRemoteDevices.getDeviceProperties(device); if (deviceProp != null) { deviceProp.setBondingInitiatedLocally(false); Loading framework/api/system-current.txt +133 −0 File changed.Preview size limit exceeded, changes collapsed. Show changes framework/java/android/bluetooth/BluetoothA2dp.java +17 −10 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ import android.annotation.RequiresNoPermission; import android.annotation.RequiresPermission; import android.annotation.SdkConstant; import android.annotation.SdkConstant.SdkConstantType; import android.annotation.SuppressLint; import android.annotation.SystemApi; import android.bluetooth.annotations.RequiresBluetoothConnectPermission; import android.bluetooth.annotations.RequiresLegacyBluetoothAdminPermission; Loading Loading @@ -124,11 +125,12 @@ public final class BluetoothA2dp implements BluetoothProfile { * * @hide */ @SystemApi @RequiresLegacyBluetoothPermission @RequiresBluetoothConnectPermission @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION) @UnsupportedAppUsage(trackingBug = 171933273) @SuppressLint("ActionValue") public static final String ACTION_ACTIVE_DEVICE_CHANGED = "android.bluetooth.a2dp.profile.action.ACTIVE_DEVICE_CHANGED"; Loading @@ -145,11 +147,12 @@ public final class BluetoothA2dp implements BluetoothProfile { * * @hide */ @SystemApi @RequiresLegacyBluetoothPermission @RequiresBluetoothConnectPermission @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION) @UnsupportedAppUsage(trackingBug = 181103983) @SuppressLint("ActionValue") public static final String ACTION_CODEC_CONFIG_CHANGED = "android.bluetooth.a2dp.profile.action.CODEC_CONFIG_CHANGED"; Loading Loading @@ -695,8 +698,12 @@ public final class BluetoothA2dp implements BluetoothProfile { * @param volume Absolute volume to be set on AVRCP side * @hide */ @SystemApi @RequiresBluetoothConnectPermission @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) @RequiresPermission(allOf = { android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED, }) public void setAvrcpAbsoluteVolume(int volume) { if (DBG) Log.d(TAG, "setAvrcpAbsoluteVolume"); final IBluetoothA2dp service = getService(); Loading Loading @@ -769,7 +776,7 @@ public final class BluetoothA2dp implements BluetoothProfile { * @return the current codec status * @hide */ @UnsupportedAppUsage(trackingBug = 181103983) @SystemApi @Nullable @RequiresLegacyBluetoothPermission @RequiresBluetoothConnectPermission Loading Loading @@ -802,7 +809,7 @@ public final class BluetoothA2dp implements BluetoothProfile { * @param codecConfig the codec configuration preference * @hide */ @UnsupportedAppUsage(trackingBug = 181103983) @SystemApi @RequiresLegacyBluetoothPermission @RequiresBluetoothConnectPermission @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) Loading Loading @@ -833,7 +840,7 @@ public final class BluetoothA2dp implements BluetoothProfile { * @param device the remote Bluetooth device. * @hide */ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) @SystemApi @RequiresLegacyBluetoothPermission @RequiresBluetoothConnectPermission @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) Loading @@ -849,7 +856,7 @@ public final class BluetoothA2dp implements BluetoothProfile { * @param device the remote Bluetooth device. * @hide */ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) @SystemApi @RequiresLegacyBluetoothPermission @RequiresBluetoothConnectPermission @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) Loading Loading @@ -892,7 +899,7 @@ public final class BluetoothA2dp implements BluetoothProfile { * OPTIONAL_CODECS_SUPPORTED. * @hide */ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) @SystemApi @RequiresLegacyBluetoothAdminPermission @RequiresBluetoothConnectPermission @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) Loading Loading @@ -925,7 +932,7 @@ public final class BluetoothA2dp implements BluetoothProfile { * OPTIONAL_CODECS_PREF_DISABLED. * @hide */ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) @SystemApi @RequiresLegacyBluetoothAdminPermission @RequiresBluetoothConnectPermission @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) Loading Loading @@ -959,7 +966,7 @@ public final class BluetoothA2dp implements BluetoothProfile { * OPTIONAL_CODECS_PREF_DISABLED. * @hide */ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) @SystemApi @RequiresLegacyBluetoothAdminPermission @RequiresBluetoothConnectPermission @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) Loading framework/java/android/bluetooth/BluetoothAdapter.java +31 −12 Original line number Diff line number Diff line Loading @@ -32,9 +32,8 @@ import android.annotation.SdkConstant.SdkConstantType; import android.annotation.SuppressLint; import android.annotation.SystemApi; //import android.app.PropertyInvalidatedCache; import android.app.PendingIntent; import android.bluetooth.BluetoothDevice.Transport; import android.bluetooth.BluetoothFrameworkInitializer; import android.bluetooth.BluetoothDevice.AddressType; import android.bluetooth.BluetoothDevice.Transport; import android.bluetooth.BluetoothProfile.ConnectionPolicy; import android.bluetooth.annotations.RequiresBluetoothAdvertisePermission; import android.bluetooth.annotations.RequiresBluetoothConnectPermission; Loading Loading @@ -224,6 +223,7 @@ public final class BluetoothAdapter { * * @hide */ @SystemApi public static final int STATE_BLE_ON = 15; /** Loading Loading @@ -271,6 +271,9 @@ public final class BluetoothAdapter { * * @hide */ @SystemApi @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) @NonNull public static String nameForState(@AdapterState int state) { switch (state) { case STATE_OFF: Loading Loading @@ -367,10 +370,13 @@ public final class BluetoothAdapter { * * @hide */ @SystemApi @RequiresLegacyBluetoothPermission @RequiresBluetoothConnectPermission @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) public static final String @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) @SuppressLint("ActionValue") public static final String ACTION_REQUEST_DISABLE = "android.bluetooth.adapter.action.REQUEST_DISABLE"; /** Loading Loading @@ -1410,7 +1416,7 @@ public final class BluetoothAdapter { * @return true to indicate that the config file was successfully cleared * @hide */ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) @SystemApi @RequiresBluetoothConnectPermission @RequiresPermission(allOf = { android.Manifest.permission.BLUETOOTH_CONNECT, Loading Loading @@ -1444,10 +1450,12 @@ public final class BluetoothAdapter { * @return the UUIDs supported by the local Bluetooth Adapter. * @hide */ @UnsupportedAppUsage @SystemApi @RequiresLegacyBluetoothPermission @RequiresBluetoothConnectPermission @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) @NonNull @SuppressLint(value = {"ArrayReturn", "NullableCollection"}) public @Nullable ParcelUuid[] getUuids() { if (getState() != STATE_ON) { return null; Loading Loading @@ -2633,12 +2641,14 @@ public final class BluetoothAdapter { * @param result The callback to which to send the activity info. * @hide */ @SystemApi @RequiresBluetoothConnectPermission @RequiresPermission(allOf = { android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED, }) public void requestControllerActivityEnergyInfo(ResultReceiver result) { public void requestControllerActivityEnergyInfo(@NonNull ResultReceiver result) { requireNonNull(result, "ResultReceiver cannot be null"); try { mServiceLock.readLock().lock(); if (mService != null) { Loading @@ -2665,9 +2675,13 @@ public final class BluetoothAdapter { * * @hide */ @SystemApi @RequiresLegacyBluetoothAdminPermission @RequiresBluetoothConnectPermission @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) @RequiresPermission(allOf = { android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED, }) public @NonNull List<BluetoothDevice> getMostRecentlyConnectedDevices() { if (getState() != STATE_ON) { return new ArrayList<>(); Loading Loading @@ -2825,8 +2839,7 @@ public final class BluetoothAdapter { * #STATE_CONNECTING} or {@link #STATE_DISCONNECTED} * @hide */ @UnsupportedAppUsage @RequiresLegacyBluetoothPermission @SystemApi @RequiresNoPermission public int getConnectionState() { if (getState() != STATE_ON) { Loading Loading @@ -4119,7 +4132,8 @@ public final class BluetoothAdapter { * * @hide */ public boolean registerServiceLifecycleCallback(ServiceLifecycleCallback callback) { @SystemApi public boolean registerServiceLifecycleCallback(@NonNull ServiceLifecycleCallback callback) { return getBluetoothService(callback.mRemote) != null; } Loading @@ -4137,6 +4151,7 @@ public final class BluetoothAdapter { * * @hide */ @SystemApi public abstract static class ServiceLifecycleCallback { /** Called when the bluetooth stack is up */ Loading Loading @@ -4612,6 +4627,7 @@ public final class BluetoothAdapter { * @throws IllegalArgumentException if the callback is already registered * @hide */ @SystemApi @RequiresBluetoothConnectPermission @RequiresPermission(allOf = { android.Manifest.permission.BLUETOOTH_CONNECT, Loading Loading @@ -4709,19 +4725,21 @@ public final class BluetoothAdapter { * * @hide */ @SystemApi public abstract static class BluetoothConnectionCallback { /** * Callback triggered when a bluetooth device (classic or BLE) is connected * @param device is the connected bluetooth device */ public void onDeviceConnected(BluetoothDevice device) {} public void onDeviceConnected(@NonNull BluetoothDevice device) {} /** * Callback triggered when a bluetooth device (classic or BLE) is disconnected * @param device is the disconnected bluetooth device * @param reason is the disconnect reason */ public void onDeviceDisconnected(BluetoothDevice device, @DisconnectReason int reason) {} public void onDeviceDisconnected(@NonNull BluetoothDevice device, @DisconnectReason int reason) {} /** * @hide Loading @@ -4744,6 +4762,7 @@ public final class BluetoothAdapter { /** * Returns human-readable strings corresponding to {@link DisconnectReason}. */ @NonNull public static String disconnectReasonText(@DisconnectReason int reason) { switch (reason) { case BluetoothStatusCodes.ERROR_UNKNOWN: Loading framework/java/android/bluetooth/BluetoothClass.java +4 −0 Original line number Diff line number Diff line Loading @@ -246,18 +246,22 @@ public final class BluetoothClass implements Parcelable { /** * @hide */ @SystemApi public static final int PERIPHERAL_NON_KEYBOARD_NON_POINTING = 0x0500; /** * @hide */ @SystemApi public static final int PERIPHERAL_KEYBOARD = 0x0540; /** * @hide */ @SystemApi public static final int PERIPHERAL_POINTING = 0x0580; /** * @hide */ @SystemApi public static final int PERIPHERAL_KEYBOARD_POINTING = 0x05C0; } Loading Loading
android/app/src/com/android/bluetooth/btservice/AdapterService.java +2 −0 Original line number Diff line number Diff line Loading @@ -2161,6 +2161,8 @@ public class AdapterService extends Service { return false; } enforceBluetoothPrivilegedPermission(service); DeviceProperties deviceProp = service.mRemoteDevices.getDeviceProperties(device); if (deviceProp != null) { deviceProp.setBondingInitiatedLocally(false); Loading
framework/api/system-current.txt +133 −0 File changed.Preview size limit exceeded, changes collapsed. Show changes
framework/java/android/bluetooth/BluetoothA2dp.java +17 −10 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ import android.annotation.RequiresNoPermission; import android.annotation.RequiresPermission; import android.annotation.SdkConstant; import android.annotation.SdkConstant.SdkConstantType; import android.annotation.SuppressLint; import android.annotation.SystemApi; import android.bluetooth.annotations.RequiresBluetoothConnectPermission; import android.bluetooth.annotations.RequiresLegacyBluetoothAdminPermission; Loading Loading @@ -124,11 +125,12 @@ public final class BluetoothA2dp implements BluetoothProfile { * * @hide */ @SystemApi @RequiresLegacyBluetoothPermission @RequiresBluetoothConnectPermission @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION) @UnsupportedAppUsage(trackingBug = 171933273) @SuppressLint("ActionValue") public static final String ACTION_ACTIVE_DEVICE_CHANGED = "android.bluetooth.a2dp.profile.action.ACTIVE_DEVICE_CHANGED"; Loading @@ -145,11 +147,12 @@ public final class BluetoothA2dp implements BluetoothProfile { * * @hide */ @SystemApi @RequiresLegacyBluetoothPermission @RequiresBluetoothConnectPermission @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION) @UnsupportedAppUsage(trackingBug = 181103983) @SuppressLint("ActionValue") public static final String ACTION_CODEC_CONFIG_CHANGED = "android.bluetooth.a2dp.profile.action.CODEC_CONFIG_CHANGED"; Loading Loading @@ -695,8 +698,12 @@ public final class BluetoothA2dp implements BluetoothProfile { * @param volume Absolute volume to be set on AVRCP side * @hide */ @SystemApi @RequiresBluetoothConnectPermission @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) @RequiresPermission(allOf = { android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED, }) public void setAvrcpAbsoluteVolume(int volume) { if (DBG) Log.d(TAG, "setAvrcpAbsoluteVolume"); final IBluetoothA2dp service = getService(); Loading Loading @@ -769,7 +776,7 @@ public final class BluetoothA2dp implements BluetoothProfile { * @return the current codec status * @hide */ @UnsupportedAppUsage(trackingBug = 181103983) @SystemApi @Nullable @RequiresLegacyBluetoothPermission @RequiresBluetoothConnectPermission Loading Loading @@ -802,7 +809,7 @@ public final class BluetoothA2dp implements BluetoothProfile { * @param codecConfig the codec configuration preference * @hide */ @UnsupportedAppUsage(trackingBug = 181103983) @SystemApi @RequiresLegacyBluetoothPermission @RequiresBluetoothConnectPermission @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) Loading Loading @@ -833,7 +840,7 @@ public final class BluetoothA2dp implements BluetoothProfile { * @param device the remote Bluetooth device. * @hide */ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) @SystemApi @RequiresLegacyBluetoothPermission @RequiresBluetoothConnectPermission @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) Loading @@ -849,7 +856,7 @@ public final class BluetoothA2dp implements BluetoothProfile { * @param device the remote Bluetooth device. * @hide */ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) @SystemApi @RequiresLegacyBluetoothPermission @RequiresBluetoothConnectPermission @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) Loading Loading @@ -892,7 +899,7 @@ public final class BluetoothA2dp implements BluetoothProfile { * OPTIONAL_CODECS_SUPPORTED. * @hide */ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) @SystemApi @RequiresLegacyBluetoothAdminPermission @RequiresBluetoothConnectPermission @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) Loading Loading @@ -925,7 +932,7 @@ public final class BluetoothA2dp implements BluetoothProfile { * OPTIONAL_CODECS_PREF_DISABLED. * @hide */ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) @SystemApi @RequiresLegacyBluetoothAdminPermission @RequiresBluetoothConnectPermission @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) Loading Loading @@ -959,7 +966,7 @@ public final class BluetoothA2dp implements BluetoothProfile { * OPTIONAL_CODECS_PREF_DISABLED. * @hide */ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) @SystemApi @RequiresLegacyBluetoothAdminPermission @RequiresBluetoothConnectPermission @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) Loading
framework/java/android/bluetooth/BluetoothAdapter.java +31 −12 Original line number Diff line number Diff line Loading @@ -32,9 +32,8 @@ import android.annotation.SdkConstant.SdkConstantType; import android.annotation.SuppressLint; import android.annotation.SystemApi; //import android.app.PropertyInvalidatedCache; import android.app.PendingIntent; import android.bluetooth.BluetoothDevice.Transport; import android.bluetooth.BluetoothFrameworkInitializer; import android.bluetooth.BluetoothDevice.AddressType; import android.bluetooth.BluetoothDevice.Transport; import android.bluetooth.BluetoothProfile.ConnectionPolicy; import android.bluetooth.annotations.RequiresBluetoothAdvertisePermission; import android.bluetooth.annotations.RequiresBluetoothConnectPermission; Loading Loading @@ -224,6 +223,7 @@ public final class BluetoothAdapter { * * @hide */ @SystemApi public static final int STATE_BLE_ON = 15; /** Loading Loading @@ -271,6 +271,9 @@ public final class BluetoothAdapter { * * @hide */ @SystemApi @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) @NonNull public static String nameForState(@AdapterState int state) { switch (state) { case STATE_OFF: Loading Loading @@ -367,10 +370,13 @@ public final class BluetoothAdapter { * * @hide */ @SystemApi @RequiresLegacyBluetoothPermission @RequiresBluetoothConnectPermission @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) public static final String @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) @SuppressLint("ActionValue") public static final String ACTION_REQUEST_DISABLE = "android.bluetooth.adapter.action.REQUEST_DISABLE"; /** Loading Loading @@ -1410,7 +1416,7 @@ public final class BluetoothAdapter { * @return true to indicate that the config file was successfully cleared * @hide */ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) @SystemApi @RequiresBluetoothConnectPermission @RequiresPermission(allOf = { android.Manifest.permission.BLUETOOTH_CONNECT, Loading Loading @@ -1444,10 +1450,12 @@ public final class BluetoothAdapter { * @return the UUIDs supported by the local Bluetooth Adapter. * @hide */ @UnsupportedAppUsage @SystemApi @RequiresLegacyBluetoothPermission @RequiresBluetoothConnectPermission @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) @NonNull @SuppressLint(value = {"ArrayReturn", "NullableCollection"}) public @Nullable ParcelUuid[] getUuids() { if (getState() != STATE_ON) { return null; Loading Loading @@ -2633,12 +2641,14 @@ public final class BluetoothAdapter { * @param result The callback to which to send the activity info. * @hide */ @SystemApi @RequiresBluetoothConnectPermission @RequiresPermission(allOf = { android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED, }) public void requestControllerActivityEnergyInfo(ResultReceiver result) { public void requestControllerActivityEnergyInfo(@NonNull ResultReceiver result) { requireNonNull(result, "ResultReceiver cannot be null"); try { mServiceLock.readLock().lock(); if (mService != null) { Loading @@ -2665,9 +2675,13 @@ public final class BluetoothAdapter { * * @hide */ @SystemApi @RequiresLegacyBluetoothAdminPermission @RequiresBluetoothConnectPermission @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) @RequiresPermission(allOf = { android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED, }) public @NonNull List<BluetoothDevice> getMostRecentlyConnectedDevices() { if (getState() != STATE_ON) { return new ArrayList<>(); Loading Loading @@ -2825,8 +2839,7 @@ public final class BluetoothAdapter { * #STATE_CONNECTING} or {@link #STATE_DISCONNECTED} * @hide */ @UnsupportedAppUsage @RequiresLegacyBluetoothPermission @SystemApi @RequiresNoPermission public int getConnectionState() { if (getState() != STATE_ON) { Loading Loading @@ -4119,7 +4132,8 @@ public final class BluetoothAdapter { * * @hide */ public boolean registerServiceLifecycleCallback(ServiceLifecycleCallback callback) { @SystemApi public boolean registerServiceLifecycleCallback(@NonNull ServiceLifecycleCallback callback) { return getBluetoothService(callback.mRemote) != null; } Loading @@ -4137,6 +4151,7 @@ public final class BluetoothAdapter { * * @hide */ @SystemApi public abstract static class ServiceLifecycleCallback { /** Called when the bluetooth stack is up */ Loading Loading @@ -4612,6 +4627,7 @@ public final class BluetoothAdapter { * @throws IllegalArgumentException if the callback is already registered * @hide */ @SystemApi @RequiresBluetoothConnectPermission @RequiresPermission(allOf = { android.Manifest.permission.BLUETOOTH_CONNECT, Loading Loading @@ -4709,19 +4725,21 @@ public final class BluetoothAdapter { * * @hide */ @SystemApi public abstract static class BluetoothConnectionCallback { /** * Callback triggered when a bluetooth device (classic or BLE) is connected * @param device is the connected bluetooth device */ public void onDeviceConnected(BluetoothDevice device) {} public void onDeviceConnected(@NonNull BluetoothDevice device) {} /** * Callback triggered when a bluetooth device (classic or BLE) is disconnected * @param device is the disconnected bluetooth device * @param reason is the disconnect reason */ public void onDeviceDisconnected(BluetoothDevice device, @DisconnectReason int reason) {} public void onDeviceDisconnected(@NonNull BluetoothDevice device, @DisconnectReason int reason) {} /** * @hide Loading @@ -4744,6 +4762,7 @@ public final class BluetoothAdapter { /** * Returns human-readable strings corresponding to {@link DisconnectReason}. */ @NonNull public static String disconnectReasonText(@DisconnectReason int reason) { switch (reason) { case BluetoothStatusCodes.ERROR_UNKNOWN: Loading
framework/java/android/bluetooth/BluetoothClass.java +4 −0 Original line number Diff line number Diff line Loading @@ -246,18 +246,22 @@ public final class BluetoothClass implements Parcelable { /** * @hide */ @SystemApi public static final int PERIPHERAL_NON_KEYBOARD_NON_POINTING = 0x0500; /** * @hide */ @SystemApi public static final int PERIPHERAL_KEYBOARD = 0x0540; /** * @hide */ @SystemApi public static final int PERIPHERAL_POINTING = 0x0580; /** * @hide */ @SystemApi public static final int PERIPHERAL_KEYBOARD_POINTING = 0x05C0; } Loading