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

Commit 750677bb authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Consolidate log messages in RemoteDevices.java"

parents 4336d7a6 ae62adac
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);