Make bluetooth toggle be on when Bluetooth is turning on
The logic should be similar to the Wi-Fi one: https://android.googlesource.com/platform/packages/apps/Settings/+/refs/heads/main/src/com/android/settings/wifi/slice/WifiSlice.java#379 BUG: 293264131 Test: unit test Change-Id: I1222f9f793b91d81d74ed9358f1b055d3049866e
This commit is contained in:
@@ -124,7 +124,8 @@ public class BluetoothSliceBuilder {
|
||||
|
||||
private static boolean isBluetoothEnabled() {
|
||||
final BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();
|
||||
return adapter.isEnabled();
|
||||
return adapter.getState() == BluetoothAdapter.STATE_ON
|
||||
|| adapter.getState() == BluetoothAdapter.STATE_TURNING_ON;
|
||||
}
|
||||
|
||||
private static PendingIntent getPrimaryAction(Context context) {
|
||||
|
Reference in New Issue
Block a user