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

Commit 56d26139 authored by Jaikumar Ganesh's avatar Jaikumar Ganesh
Browse files

Handle Input and network signal changes for HID and tethering.

Change-Id: I7f0c2884bb766189b41093bdcd6241f4540a31f3
parent 506821b4
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);