uwb/aidl/default: Use write_all instead of write in sendUciMessage
write_all ensures that the full buffer is being written. Bug: 329316454 Test: TreeHugger Change-Id: I422445aff32cdeba8fba9497a4296e6eda2e60ce
This commit is contained in:
parent
67b4c13cf7
commit
cd3a3402b5
1 changed files with 2 additions and 2 deletions
|
@ -287,8 +287,8 @@ impl IUwbChipAsyncServer for UwbChip {
|
|||
if let State::Opened { ref mut serial, .. } = &mut *self.state.lock().await {
|
||||
log::debug!(" --> {:?}", data);
|
||||
let result = serial
|
||||
.write(data)
|
||||
.map(|written| written as i32)
|
||||
.write_all(data)
|
||||
.map(|_| data.len() as i32)
|
||||
.map_err(|_| binder::StatusCode::UNKNOWN_ERROR.into());
|
||||
log::debug!(" status: {:?}", result);
|
||||
result
|
||||
|
|
Loading…
Reference in a new issue