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

Commit 28a8467e authored by Jaikumar Ganesh's avatar Jaikumar Ganesh Committed by Android (Google) Code Review
Browse files

Merge "Handle Input and network signal changes for HID and tethering."

parents 51b7ebc6 56d26139
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -1340,9 +1340,7 @@ public class BluetoothService extends IBluetooth.Stub {

    }

    /*package*/ void handleInputDevicePropertyChange(String path, boolean connected) {
        String address = getAddressFromObjectPath(path);
        if (address == null) return;
    /*package*/ void handleInputDevicePropertyChange(String address, boolean connected) {
        int state = connected ? BluetoothInputDevice.STATE_CONNECTED :
            BluetoothInputDevice.STATE_DISCONNECTED;
        BluetoothDevice device = mAdapter.getRemoteDevice(address);
+14 −0
Original line number Diff line number Diff line
@@ -230,6 +230,20 @@ static jboolean setUpEventLoop(native_data_t *nat) {
            LOG_AND_FREE_DBUS_ERROR(&err);
            return JNI_FALSE;
        }
        dbus_bus_add_match(nat->conn,
                "type='signal',interface='"BLUEZ_DBUS_BASE_IFC".Input'",
                &err);
        if (dbus_error_is_set(&err)) {
            LOG_AND_FREE_DBUS_ERROR(&err);
            return JNI_FALSE;
        }
        dbus_bus_add_match(nat->conn,
                "type='signal',interface='"BLUEZ_DBUS_BASE_IFC".Network'",
                &err);
        if (dbus_error_is_set(&err)) {
            LOG_AND_FREE_DBUS_ERROR(&err);
            return JNI_FALSE;
        }
        dbus_bus_add_match(nat->conn,
                "type='signal',interface='org.bluez.AudioSink'",
                &err);