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

Commit 6a47e343 authored by Michael Sun's avatar Michael Sun Committed by Automerger Merge Worker
Browse files

Merge "Revert "floss: hid: reply to get_report callback"" into main am: dc813236

parents 227c416d dc813236
Loading
Loading
Loading
Loading
+1 −8
Original line number Diff line number Diff line
@@ -2818,20 +2818,13 @@ impl BtifHHCallbacks for Bluetooth {
        );
    }

    fn get_report(
        &mut self,
        mut address: RawAddress,
        status: BthhStatus,
        mut data: Vec<u8>,
        size: i32,
    ) {
    fn get_report(&mut self, address: RawAddress, status: BthhStatus, _data: Vec<u8>, size: i32) {
        debug!(
            "Hid host got report: Address({}) Status({:?}) Report Size({:?})",
            DisplayAddress(&address),
            status,
            size
        );
        self.hh.as_ref().unwrap().get_report_reply(&mut address, status, &mut data, size as u16);
    }

    fn handshake(&mut self, address: RawAddress, status: BthhStatus) {
+0 −19
Original line number Diff line number Diff line
@@ -306,25 +306,6 @@ impl HidHost {
        ))
    }

    #[profile_enabled_or(BtStatus::NotReady)]
    pub fn get_report_reply(
        &self,
        addr: &mut RawAddress,
        status: BthhStatus,
        report: &mut [u8],
        size: u16,
    ) -> BtStatus {
        let addr_ptr = LTCheckedPtrMut::from_ref(addr);
        BtStatus::from(ccall!(
            self,
            get_report_reply,
            addr_ptr.into(),
            status as bindings::bthh_status_t,
            report.as_mut_ptr() as *mut std::os::raw::c_char,
            size
        ))
    }

    #[profile_enabled_or(BtStatus::NotReady)]
    pub fn set_report(
        &self,