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

Commit 501ef411 authored by Martin Brabham's avatar Martin Brabham
Browse files

Floss: Add GATT interface for use by modules.

Bug: 224602924
Bug: 224603540
Bug: 224603198
Test: mma -j $(nproc)
Test: ./build.py
Test: system/gd/cert/run --clean --topshim
Tag: #floss
Change-Id: Ia25052be6b17e5cd322f79d0dec5d85ccc42bec7
parent 252313e1
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -54,7 +54,7 @@ class GattClient():
        """
        await self.__gatt_stub.RegisterAdvertiser(empty_proto.Empty())

    async def unregister_advertiser(self):
    async def unregister_advertiser(self, advertiser_id):
        """
        Stop advertising for advertiser id
        """
@@ -76,10 +76,15 @@ class GattClient():
        """
        await self.__gatt_stub.SetData(empty_proto.Empty())

    async def enable(self):
    async def advertising_enable(self):
        """
        """
        await self.__gatt_stub.Enable(empty_proto.Empty())
        await self.__gatt_stub.AdvertisingEnable(empty_proto.Empty())

    async def advertising_disable(self):
        """
        """
        await self.__gatt_stub.AdvertisingDisable(empty_proto.Empty())

    async def set_periodic_advertising_parameters(self):
        """
+240 −0
Original line number Diff line number Diff line
@@ -132,12 +132,15 @@ impl RPCProxy for IBluetoothCallbackDBus {
    fn register_disconnect(&mut self, _f: Box<dyn Fn(u32) + Send>) -> u32 {
        0
    }

    fn get_object_id(&self) -> String {
        String::from("")
    }

    fn unregister(&mut self, _id: u32) -> bool {
        false
    }

    fn export_for_rpc(self: Box<Self>) {}
}

@@ -188,12 +191,15 @@ impl RPCProxy for IBluetoothConnectionCallbackDBus {
    fn register_disconnect(&mut self, _f: Box<dyn Fn(u32) + Send>) -> u32 {
        0
    }

    fn get_object_id(&self) -> String {
        String::from("")
    }

    fn unregister(&mut self, _id: u32) -> bool {
        false
    }

    fn export_for_rpc(self: Box<Self>) {}
}

@@ -553,12 +559,15 @@ impl RPCProxy for IBluetoothManagerCallbackDBus {
    fn register_disconnect(&mut self, _f: Box<dyn Fn(u32) + Send>) -> u32 {
        0
    }

    fn get_object_id(&self) -> String {
        String::from("")
    }

    fn unregister(&mut self, _id: u32) -> bool {
        false
    }

    fn export_for_rpc(self: Box<Self>) {}
}

@@ -633,6 +642,231 @@ impl IBluetoothGatt for BluetoothGattDBus {
        dbus_generated!()
    }

    // Advertising
    fn register_advertiser(&self) {
        // TODO(b/233128294): implement
        todo!()
    }

    fn unregister_advertiser(&self) {
        // TODO(b/233128294): implement
        todo!()
    }

    fn get_own_address(&self) {
        // TODO(b/233128294): implement
        todo!()
    }

    fn set_parameters(&self) {
        // TODO(b/233128294): implement
        todo!()
    }

    fn set_data(&self) {
        // TODO(b/233128294): implement
        todo!()
    }

    fn advertising_enable(&self) {
        // TODO(b/233128294): implement
        todo!()
    }

    fn advertising_disable(&self) {
        // TODO(b/233128294): implement
        todo!()
    }

    fn set_periodic_advertising_parameters(&self) {
        // TODO(b/233128294): implement
        todo!()
    }

    fn set_periodic_advertising_data(&self) {
        // TODO(b/233128294): implement
        todo!()
    }

    fn set_periodic_advertising_enable(&self) {
        // TODO(b/233128294): implement
        todo!()
    }

    fn start_advertising(&self) {
        // TODO(b/233128294): implement
        todo!()
    }

    fn start_advertising_set(&self) {
        // TODO(b/233128294): implement
        todo!()
    }

    // Scanning

    fn scan_filter_setup(&self) {
        // TODO(b/200066804): implement
        todo!()
    }

    fn scan_filter_add(&self) {
        // TODO(b/200066804): implement
        todo!()
    }

    fn scan_filter_clear(&self) {
        // TODO(b/200066804): implement
        todo!()
    }

    fn scan_filter_enable(&self) {
        // TODO(b/200066804): implement
        todo!()
    }

    fn scan_filter_disable(&self) {
        // TODO(b/200066804): implement
        todo!()
    }

    fn set_scan_parameters(&self) {
        // TODO(b/200066804): implement
        todo!()
    }

    fn batch_scan_config_storage(&self) {
        // TODO(b/200066804): implement
        todo!()
    }

    fn batch_scan_enable(&self) {
        // TODO(b/200066804): implement
        todo!()
    }

    fn batch_scan_disable(&self) {
        // TODO(b/200066804): implement
        todo!()
    }

    fn batch_scan_read_reports(&self) {
        // TODO(b/200066804): implement
        todo!()
    }

    // GATT Client
    fn start_sync(&self) {
        // TODO(b/193686094): implement
        todo!()
    }

    fn stop_sync(&self) {
        // TODO(b/193686094): implement
        todo!()
    }

    fn cancel_create_sync(&self) {
        // TODO(b/193686094): implement
        todo!()
    }

    fn transfer_sync(&self) {
        // TODO(b/193686094): implement
        todo!()
    }

    fn transfer_set_info(&self) {
        // TODO(b/193686094): implement
        todo!()
    }

    fn sync_tx_parameters(&self) {
        // TODO(b/193686094): implement
        todo!()
    }

    fn execute_write(&self) {
        // TODO(b/193686094): implement
        todo!()
    }

    fn deregister_for_notification(&self) {
        // TODO(b/193686094): implement
        todo!()
    }

    fn get_device_type(&self) {
        // TODO(b/193686094): implement
        todo!()
    }

    fn test_command(&self) {
        // TODO(b/193686094): implement
        todo!()
    }

    fn get_gatt_db(&self) {
        // TODO(b/193686094): implement
        todo!()
    }

    // GATT Server
    fn register_server(&self) {
        // TODO(b/193686564): implement
        todo!()
    }

    fn unregister_server(&self) {
        // TODO(b/193686564): implement
        todo!()
    }

    fn server_connect(&self) {
        // TODO(b/193686564): implement
        todo!()
    }

    fn server_disconnect(&self) {
        // TODO(b/193686564): implement
        todo!()
    }

    fn add_service(&self) {
        // TODO(b/193686564): implement
        todo!()
    }

    fn stop_service(&self) {
        // TODO(b/193686564): implement
        todo!()
    }

    fn delete_service(&self) {
        // TODO(b/193686564): implement
        todo!()
    }

    fn send_indication(&self) {
        // TODO(b/193686564): implement
        todo!()
    }

    fn send_response(&self) {
        // TODO(b/193686564): implement
        todo!()
    }

    fn server_set_preferred_phy(&self) {
        // TODO(b/193686564): implement
        todo!()
    }

    fn server_read_phy(&self) {
        // TODO(b/193686564): implement
        todo!()
    }

    #[dbus_method("RegisterClient")]
    fn register_client(
        &mut self,
@@ -794,12 +1028,15 @@ impl RPCProxy for IBluetoothGattCallbackDBus {
    fn register_disconnect(&mut self, _f: Box<dyn Fn(u32) + Send>) -> u32 {
        0
    }

    fn get_object_id(&self) -> String {
        String::from("")
    }

    fn unregister(&mut self, _id: u32) -> bool {
        false
    }

    fn export_for_rpc(self: Box<Self>) {}
}

@@ -1102,12 +1339,15 @@ impl RPCProxy for ISuspendCallbackDBus {
    fn register_disconnect(&mut self, _f: Box<dyn Fn(u32) + Send>) -> u32 {
        0
    }

    fn get_object_id(&self) -> String {
        String::from("")
    }

    fn unregister(&mut self, _id: u32) -> bool {
        false
    }

    fn export_for_rpc(self: Box<Self>) {}
}

+242 −17
Original line number Diff line number Diff line
@@ -212,6 +212,69 @@ impl IBluetoothGatt for IBluetoothGattDBus {
        dbus_generated!()
    }

    // Advertising
    fn register_advertiser(&self) {
        // TODO(b/233128294): implement
        todo!()
    }

    fn unregister_advertiser(&self) {
        // TODO(b/233128294): implement
        todo!()
    }

    /// Get the address currently being advertised
    fn get_own_address(&self) {
        // TODO(b/233128294): implement
        todo!()
    }

    fn set_parameters(&self) {
        // TODO(b/233128294): implement
        todo!()
    }

    fn set_data(&self) {
        // TODO(b/233128294): implement
        todo!()
    }

    fn advertising_enable(&self) {
        // TODO(b/233128294): implement
        todo!()
    }

    fn advertising_disable(&self) {
        // TODO(b/233128294): implement
        todo!()
    }

    fn set_periodic_advertising_parameters(&self) {
        // TODO(b/233128294): implement
        todo!()
    }

    fn set_periodic_advertising_data(&self) {
        // TODO(b/233128294): implement
        todo!()
    }

    fn set_periodic_advertising_enable(&self) {
        // TODO(b/233128294): implement
        todo!()
    }

    fn start_advertising(&self) {
        // TODO(b/233128294): implement
        todo!()
    }

    fn start_advertising_set(&self) {
        // TODO(b/233128294): implement
        todo!()
    }

    // Scanning
    #[dbus_method("RegisterScanner")]
    fn register_scanner(&mut self, callback_id: u32) -> Uuid128Bit {
        dbus_generated!()
@@ -232,6 +295,87 @@ impl IBluetoothGatt for IBluetoothGattDBus {
        dbus_generated!()
    }

    fn scan_filter_setup(&self) {
        // TODO(b/200066804): implement
        todo!()
    }

    fn scan_filter_add(&self) {
        // TODO(b/200066804): implement
        todo!()
    }

    fn scan_filter_clear(&self) {
        // TODO(b/200066804): implement
        todo!()
    }

    fn scan_filter_enable(&self) {
        // TODO(b/200066804): implement
        todo!()
    }

    fn scan_filter_disable(&self) {
        // TODO(b/200066804): implement
        todo!()
    }

    fn set_scan_parameters(&self) {
        // TODO(b/200066804): implement
        todo!()
    }

    fn batch_scan_config_storage(&self) {
        // TODO(b/200066804): implement
        todo!()
    }

    fn batch_scan_enable(&self) {
        // TODO(b/200066804): implement
        todo!()
    }

    fn batch_scan_disable(&self) {
        // TODO(b/200066804): implement
        todo!()
    }

    fn batch_scan_read_reports(&self) {
        // TODO(b/200066804): implement
        todo!()
    }

    // GATT Client
    fn start_sync(&self) {
        // TODO(b/193686094): implement
        todo!()
    }

    fn stop_sync(&self) {
        // TODO(b/193686094): implement
        todo!()
    }

    fn cancel_create_sync(&self) {
        // TODO(b/193686094): implement
        todo!()
    }

    fn transfer_sync(&self) {
        // TODO(b/193686094): implement
        todo!()
    }

    fn transfer_set_info(&self) {
        // TODO(b/193686094): implement
        todo!()
    }

    fn sync_tx_parameters(&self) {
        // TODO(b/193686094): implement
        todo!()
    }

    #[dbus_method("RegisterClient")]
    fn register_client(
        &mut self,
@@ -265,23 +409,6 @@ impl IBluetoothGatt for IBluetoothGattDBus {
        dbus_generated!()
    }

    #[dbus_method("ClientSetPreferredPhy")]
    fn client_set_preferred_phy(
        &self,
        client_id: i32,
        addr: String,
        tx_phy: LePhy,
        rx_phy: LePhy,
        phy_options: i32,
    ) {
        dbus_generated!()
    }

    #[dbus_method("ClientReadPhy")]
    fn client_read_phy(&mut self, client_id: i32, addr: String) {
        dbus_generated!()
    }

    #[dbus_method("RefreshDevice")]
    fn refresh_device(&self, client_id: i32, addr: String) {
        dbus_generated!()
@@ -384,4 +511,102 @@ impl IBluetoothGatt for IBluetoothGattDBus {
    ) {
        dbus_generated!()
    }

    fn execute_write(&self) {
        // TODO(b/193686094): implement
        todo!()
    }

    fn deregister_for_notification(&self) {
        // TODO(b/193686094): implement
        todo!()
    }

    fn get_device_type(&self) {
        // TODO(b/193686094): implement
        todo!()
    }

    #[dbus_method("ClientSetPreferredPhy")]
    fn client_set_preferred_phy(
        &self,
        client_id: i32,
        addr: String,
        tx_phy: LePhy,
        rx_phy: LePhy,
        phy_options: i32,
    ) {
        dbus_generated!()
    }

    #[dbus_method("ClientReadPhy")]
    fn client_read_phy(&mut self, client_id: i32, addr: String) {
        dbus_generated!()
    }

    fn test_command(&self) {
        // TODO(b/193686094): implement
        todo!()
    }

    fn get_gatt_db(&self) {
        // TODO(b/193686094): implement
        todo!()
    }

    // GATT Server
    fn register_server(&self) {
        // TODO(b/193686564): implement
        todo!()
    }

    fn unregister_server(&self) {
        // TODO(b/193686564): implement
        todo!()
    }

    fn server_connect(&self) {
        // TODO(b/193686564): implement
        todo!()
    }

    fn server_disconnect(&self) {
        // TODO(b/193686564): implement
        todo!()
    }

    fn add_service(&self) {
        // TODO(b/193686564): implement
        todo!()
    }

    fn stop_service(&self) {
        // TODO(b/193686564): implement
        todo!()
    }

    fn delete_service(&self) {
        // TODO(b/193686564): implement
        todo!()
    }

    fn send_indication(&self) {
        // TODO(b/193686564): implement
        todo!()
    }

    fn send_response(&self) {
        // TODO(b/193686564): implement
        todo!()
    }

    fn server_set_preferred_phy(&self) {
        // TODO(b/193686564): implement
        todo!()
    }

    fn server_read_phy(&self) {
        // TODO(b/193686564): implement
        todo!()
    }
}
+367 −43
Original line number Diff line number Diff line
@@ -139,12 +139,41 @@ impl ContextMap {
}

/// Defines the GATT API.
// TODO(242083290): Split out interfaces.
pub trait IBluetoothGatt {
    /// Registers an LE scanner callback.
    ///
    /// Returns the callback id.
    fn register_scanner_callback(&mut self, callback: Box<dyn IScannerCallback + Send>) -> u32;

    // Advertising
    fn register_advertiser(&self);

    fn unregister_advertiser(&self);

    /// Get the address currently being advertised
    fn get_own_address(&self);

    fn set_parameters(&self);

    fn set_data(&self);

    fn advertising_enable(&self);

    fn advertising_disable(&self);

    fn set_periodic_advertising_parameters(&self);

    fn set_periodic_advertising_data(&self);

    fn set_periodic_advertising_enable(&self);

    fn start_advertising(&self);

    fn start_advertising_set(&self);

    // Scanning

    /// Unregisters an LE scanner callback identified by the given id.
    fn unregister_scanner_callback(&mut self, callback_id: u32) -> bool;

@@ -158,8 +187,42 @@ pub trait IBluetoothGatt {
    fn unregister_scanner(&mut self, scanner_id: u8) -> bool;

    fn start_scan(&self, scanner_id: i32, settings: ScanSettings, filters: Vec<ScanFilter>);

    fn stop_scan(&self, scanner_id: i32);

    fn scan_filter_setup(&self);

    fn scan_filter_add(&self);

    fn scan_filter_clear(&self);

    fn scan_filter_enable(&self);

    fn scan_filter_disable(&self);

    fn set_scan_parameters(&self);

    fn batch_scan_config_storage(&self);

    fn batch_scan_enable(&self);

    fn batch_scan_disable(&self);

    fn batch_scan_read_reports(&self);

    // GATT Client
    fn start_sync(&self);

    fn stop_sync(&self);

    fn cancel_create_sync(&self);

    fn transfer_sync(&self);

    fn transfer_set_info(&self);

    fn sync_tx_parameters(&self);

    /// Registers a GATT Client.
    fn register_client(
        &mut self,
@@ -185,19 +248,6 @@ pub trait IBluetoothGatt {
    /// Disconnects a GATT connection.
    fn client_disconnect(&self, client_id: i32, addr: String);

    /// Sets preferred PHY.
    fn client_set_preferred_phy(
        &self,
        client_id: i32,
        addr: String,
        tx_phy: LePhy,
        rx_phy: LePhy,
        phy_options: i32,
    );

    /// Reads the PHY used by a peer.
    fn client_read_phy(&mut self, client_id: i32, addr: String);

    /// Clears the attribute cache of a device.
    fn refresh_device(&self, client_id: i32, addr: String);

@@ -272,6 +322,52 @@ pub trait IBluetoothGatt {
        min_ce_len: u16,
        max_ce_len: u16,
    );

    fn execute_write(&self);

    fn deregister_for_notification(&self);

    fn get_device_type(&self);

    /// Sets preferred PHY.
    fn client_set_preferred_phy(
        &self,
        client_id: i32,
        addr: String,
        tx_phy: LePhy,
        rx_phy: LePhy,
        phy_options: i32,
    );

    /// Reads the PHY used by a peer.
    fn client_read_phy(&mut self, client_id: i32, addr: String);

    fn test_command(&self);

    fn get_gatt_db(&self);

    // GATT Server
    fn register_server(&self);

    fn unregister_server(&self);

    fn server_connect(&self);

    fn server_disconnect(&self);

    fn add_service(&self);

    fn stop_service(&self);

    fn delete_service(&self);

    fn send_indication(&self);

    fn send_response(&self);

    fn server_set_preferred_phy(&self);

    fn server_read_phy(&self);
}

#[derive(Debug, Default)]
@@ -525,6 +621,7 @@ impl BluetoothGatt {
    }

    pub fn init_profiles(&mut self, tx: Sender<Message>) {
        println!("woot woot");
        self.gatt = Gatt::new(&self.intf.lock().unwrap());

        let tx_clone = tx.clone();
@@ -654,12 +751,158 @@ impl IBluetoothGatt for BluetoothGatt {
        true
    }

    // Advertising
    fn register_advertiser(&self) {
        // TODO(b/233128294): implement
        todo!()
    }

    fn unregister_advertiser(&self) {
        // TODO(b/233128294): implement
        todo!()
    }

    /// Get the address currently being advertised
    fn get_own_address(&self) {
        // TODO(b/233128294): implement
        todo!()
    }

    fn set_parameters(&self) {
        // TODO(b/233128294): implement
        todo!()
    }

    fn set_data(&self) {
        // TODO(b/233128294): implement
        todo!()
    }

    fn advertising_enable(&self) {
        // TODO(b/233128294): implement
        todo!()
    }

    fn advertising_disable(&self) {
        // TODO(b/233128294): implement
        todo!()
    }

    fn set_periodic_advertising_parameters(&self) {
        // TODO(b/233128294): implement
        todo!()
    }

    fn set_periodic_advertising_data(&self) {
        // TODO(b/233128294): implement
        todo!()
    }

    fn set_periodic_advertising_enable(&self) {
        // TODO(b/233128294): implement
        todo!()
    }

    fn start_advertising(&self) {
        // TODO(b/233128294): implement
        todo!()
    }

    fn start_advertising_set(&self) {
        // TODO(b/233128294): implement
        todo!()
    }

    // Scanning
    fn start_scan(&self, _scanner_id: i32, _settings: ScanSettings, _filters: Vec<ScanFilter>) {
        // TODO(b/200066804): implement
        todo!()
    }

    fn stop_scan(&self, _scanner_id: i32) {
        // TODO(b/200066804): implement
        todo!()
    }

    fn scan_filter_setup(&self) {
        // TODO(b/200066804): implement
        todo!()
    }

    fn scan_filter_add(&self) {
        // TODO(b/200066804): implement
        todo!()
    }

    fn scan_filter_clear(&self) {
        // TODO(b/200066804): implement
        todo!()
    }

    fn scan_filter_enable(&self) {
        // TODO(b/200066804): implement
        todo!()
    }

    fn scan_filter_disable(&self) {
        // TODO(b/200066804): implement
        todo!()
    }

    fn set_scan_parameters(&self) {
        // TODO(b/200066804): implement
        todo!()
    }

    fn batch_scan_config_storage(&self) {
        // TODO(b/200066804): implement
        todo!()
    }

    fn batch_scan_enable(&self) {
        // TODO(b/200066804): implement
        todo!()
    }

    fn batch_scan_disable(&self) {
        // TODO(b/200066804): implement
        todo!()
    }

    fn batch_scan_read_reports(&self) {
        // TODO(b/200066804): implement
        todo!()
    }

    // GATT Client
    fn start_sync(&self) {
        // TODO(b/193686094): implement
        todo!()
    }

    fn stop_sync(&self) {
        // TODO(b/193686094): implement
        todo!()
    }

    fn cancel_create_sync(&self) {
        // TODO(b/193686094): implement
        todo!()
    }

    fn transfer_sync(&self) {
        // TODO(b/193686094): implement
        todo!()
    }

    fn transfer_set_info(&self) {
        // TODO(b/193686094): implement
        todo!()
    }

    fn sync_tx_parameters(&self) {
        // TODO(b/193686094): implement
        todo!()
    }

    fn register_client(
@@ -715,36 +958,6 @@ impl IBluetoothGatt for BluetoothGatt {
        );
    }

    fn client_set_preferred_phy(
        &self,
        client_id: i32,
        address: String,
        tx_phy: LePhy,
        rx_phy: LePhy,
        phy_options: i32,
    ) {
        let conn_id = self.context_map.get_conn_id_from_address(client_id, &address);
        if conn_id.is_none() {
            return;
        }

        self.gatt.as_ref().unwrap().client.set_preferred_phy(
            &RawAddress::from_string(address).unwrap(),
            tx_phy.to_u8().unwrap(),
            rx_phy.to_u8().unwrap(),
            phy_options as u16,
        );
    }

    fn client_read_phy(&mut self, client_id: i32, addr: String) {
        let address = match RawAddress::from_string(addr.clone()) {
            None => return,
            Some(addr) => addr,
        };

        self.gatt.as_mut().unwrap().client.read_phy(client_id, &address);
    }

    fn refresh_device(&self, client_id: i32, addr: String) {
        self.gatt
            .as_ref()
@@ -972,6 +1185,117 @@ impl IBluetoothGatt for BluetoothGatt {
            max_ce_len,
        );
    }

    fn execute_write(&self) {
        // TODO(b/193686094): implement
        todo!()
    }

    fn deregister_for_notification(&self) {
        // TODO(b/193686094): implement
        todo!()
    }

    fn get_device_type(&self) {
        // TODO(b/193686094): implement
        todo!()
    }

    fn client_set_preferred_phy(
        &self,
        client_id: i32,
        address: String,
        tx_phy: LePhy,
        rx_phy: LePhy,
        phy_options: i32,
    ) {
        let conn_id = self.context_map.get_conn_id_from_address(client_id, &address);
        if conn_id.is_none() {
            return;
        }

        self.gatt.as_ref().unwrap().client.set_preferred_phy(
            &RawAddress::from_string(address).unwrap(),
            tx_phy.to_u8().unwrap(),
            rx_phy.to_u8().unwrap(),
            phy_options as u16,
        );
    }

    fn client_read_phy(&mut self, client_id: i32, addr: String) {
        let address = match RawAddress::from_string(addr.clone()) {
            None => return,
            Some(addr) => addr,
        };

        self.gatt.as_mut().unwrap().client.read_phy(client_id, &address);
    }

    fn test_command(&self) {
        // TODO(b/193686094): implement
        todo!()
    }

    fn get_gatt_db(&self) {
        // TODO(b/193686094): implement
        todo!()
    }

    // GATT Server
    fn register_server(&self) {
        // TODO(b/193686564): implement
        todo!()
    }

    fn unregister_server(&self) {
        // TODO(b/193686564): implement
        todo!()
    }

    fn server_connect(&self) {
        // TODO(b/193686564): implement
        todo!()
    }

    fn server_disconnect(&self) {
        // TODO(b/193686564): implement
        todo!()
    }

    fn add_service(&self) {
        // TODO(b/193686564): implement
        todo!()
    }

    fn stop_service(&self) {
        // TODO(b/193686564): implement
        todo!()
    }

    fn delete_service(&self) {
        // TODO(b/193686564): implement
        todo!()
    }

    fn send_indication(&self) {
        // TODO(b/193686564): implement
        todo!()
    }

    fn send_response(&self) {
        // TODO(b/193686564): implement
        todo!()
    }

    fn server_set_preferred_phy(&self) {
        // TODO(b/193686564): implement
        todo!()
    }

    fn server_read_phy(&self) {
        // TODO(b/193686564): implement
        todo!()
    }
}

#[btif_callbacks_dispatcher(BluetoothGatt, dispatch_gatt_client_callbacks, GattClientCallbacks)]
+2 −2
Original line number Diff line number Diff line
@@ -158,8 +158,8 @@ impl ISuspend for Suspend {

    fn resume(&self) -> bool {
        self.intf.lock().unwrap().set_default_event_mask();
        self.intf.lock().unwrap().set_event_filter_inquiry_result_all_devices();
        self.intf.lock().unwrap().set_event_filter_connection_setup_all_devices();
        //        self.intf.lock().unwrap().set_event_filter_inquiry_result_all_devices();
        //        self.intf.lock().unwrap().set_event_filter_connection_setup_all_devices();
        if self.is_connected_suspend {
            if self.was_a2dp_connected {
                // TODO(230604670): self.intf.lock().unwrap().restore_filter_accept_list();