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

Commit aa8bbd20 authored by Jack He's avatar Jack He Committed by Myles Watson
Browse files

Consolidate log messages in RemoteDevices.java

Test: make, no user visible effect
Change-Id: I8725b2d97cdc45e8751b45fc08e6943d48ce9ece
parent 6c47eb9a
Loading
Loading
Loading
Loading
+4 −3
Original line number Original line Diff line number Diff line
@@ -392,7 +392,6 @@ final class RemoteDevices {
            return;
            return;
        }
        }
        int state = mAdapterService.getState();
        int state = mAdapterService.getState();
        Log.e(TAG, "state " + BluetoothAdapter.nameForState(state) + " newState " + newState);


        Intent intent = null;
        Intent intent = null;
        if (newState == AbstractionLayer.BT_ACL_STATE_CONNECTED) {
        if (newState == AbstractionLayer.BT_ACL_STATE_CONNECTED) {
@@ -401,7 +400,8 @@ final class RemoteDevices {
            } else if (state == BluetoothAdapter.STATE_BLE_ON || state == BluetoothAdapter.STATE_BLE_TURNING_ON) {
            } else if (state == BluetoothAdapter.STATE_BLE_ON || state == BluetoothAdapter.STATE_BLE_TURNING_ON) {
                intent = new Intent(BluetoothAdapter.ACTION_BLE_ACL_CONNECTED);
                intent = new Intent(BluetoothAdapter.ACTION_BLE_ACL_CONNECTED);
            }
            }
            debugLog("aclStateChangeCallback: Connected: " + device);
            debugLog("aclStateChangeCallback: Adapter State: "
                    + BluetoothAdapter.nameForState(state) + " Connected: " + device);
        } else {
        } else {
            if (device.getBondState() == BluetoothDevice.BOND_BONDING) {
            if (device.getBondState() == BluetoothDevice.BOND_BONDING) {
                // Send PAIRING_CANCEL intent to dismiss any dialog requesting bonding.
                // Send PAIRING_CANCEL intent to dismiss any dialog requesting bonding.
@@ -415,7 +415,8 @@ final class RemoteDevices {
            } else if (state == BluetoothAdapter.STATE_BLE_ON || state == BluetoothAdapter.STATE_BLE_TURNING_OFF) {
            } else if (state == BluetoothAdapter.STATE_BLE_ON || state == BluetoothAdapter.STATE_BLE_TURNING_OFF) {
                intent = new Intent(BluetoothAdapter.ACTION_BLE_ACL_DISCONNECTED);
                intent = new Intent(BluetoothAdapter.ACTION_BLE_ACL_DISCONNECTED);
            }
            }
            debugLog("aclStateChangeCallback: Disconnected: " + device);
            debugLog("aclStateChangeCallback: Adapter State: "
                    + BluetoothAdapter.nameForState(state) + " Disconnected: " + device);
        }
        }
        intent.putExtra(BluetoothDevice.EXTRA_DEVICE, device);
        intent.putExtra(BluetoothDevice.EXTRA_DEVICE, device);
        intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT);
        intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT);