topshim: Add address type to remote_device_properties_cb
The btif API was changed by http://ag/32789522
Bug: 358566084
Bug: 369703686
Test: m com.google.android.bt
Test: floss/build/build-in-container.py
Test: emerge floss
Flag: EXEMPT Floss only change
Change-Id: I0d65a27b2bb8c357c3269ea39491399387238e88
diff --git a/floss/rust/linux/stack/src/bluetooth.rs b/floss/rust/linux/stack/src/bluetooth.rs
index c97c39e..58509e1 100644
--- a/floss/rust/linux/stack/src/bluetooth.rs
+++ b/floss/rust/linux/stack/src/bluetooth.rs
@@ -1520,6 +1520,7 @@
&mut self,
status: BtStatus,
addr: RawAddress,
+ addr_type: u8,
num_properties: i32,
properties: Vec<BluetoothProperty>,
) {
@@ -2015,6 +2016,7 @@
&mut self,
_status: BtStatus,
addr: RawAddress,
+ _addr_type: u8,
_num_properties: i32,
properties: Vec<BluetoothProperty>,
) {
diff --git a/floss/rust/topshim/src/btif.rs b/floss/rust/topshim/src/btif.rs
index ae38446..bc360a8 100644
--- a/floss/rust/topshim/src/btif.rs
+++ b/floss/rust/topshim/src/btif.rs
@@ -7,16 +7,15 @@
use crate::utils::{LTCheckedPtr, LTCheckedPtrMut};
use num_derive::{FromPrimitive, ToPrimitive};
use num_traits::cast::{FromPrimitive, ToPrimitive};
-use std::cmp;
use std::convert::TryFrom;
use std::fmt::{Debug, Display, Formatter, Result};
use std::hash::{Hash, Hasher};
-use std::mem;
use std::os::fd::RawFd;
use std::os::raw::c_char;
use std::ptr::NonNull;
use std::sync::{Arc, Mutex};
use std::vec::Vec;
+use std::{cmp, mem};
use topshim_macros::{cb_variant, gen_cxx_extern_trivial};
#[derive(Clone, Debug, FromPrimitive, ToPrimitive, PartialEq, PartialOrd)]
@@ -1035,7 +1034,7 @@
pub enum BaseCallbacks {
AdapterState(BtState),
AdapterProperties(BtStatus, i32, Vec<BluetoothProperty>),
- RemoteDeviceProperties(BtStatus, RawAddress, i32, Vec<BluetoothProperty>),
+ RemoteDeviceProperties(BtStatus, RawAddress, u8, i32, Vec<BluetoothProperty>),
DeviceFound(i32, Vec<BluetoothProperty>),
DiscoveryState(BtDiscoveryState),
PinRequest(RawAddress, String, u32, bool),
@@ -1078,9 +1077,9 @@
let _2 = ptr_to_vec(_2, _1 as usize);
});
cb_variant!(BaseCb, remote_device_properties_cb -> BaseCallbacks::RemoteDeviceProperties,
-u32 -> BtStatus, *mut RawAddress -> RawAddress, i32, *mut bindings::bt_property_t, {
+u32 -> BtStatus, *mut RawAddress -> RawAddress, u8, i32, *mut bindings::bt_property_t, {
let _1 = unsafe { *(_1 as *const RawAddress) };
- let _3 = ptr_to_vec(_3, _2 as usize);
+ let _4 = ptr_to_vec(_4, _3 as usize);
});
cb_variant!(BaseCb, device_found_cb -> BaseCallbacks::DeviceFound,
i32, *mut bindings::bt_property_t, {