Fix data type when querying remote_dev type
The check of BT_PROPERTY_TYPE_OF_DEVICE property requires size of 4 bytes, but some of the read attempts only provide 1 byte of data. This causes those read attempts to fail. Even though the underlying data fits within 1 byte, there are a lot of places which assume 4 bytes of data, so changing this to 1 byte breaks those assumption and might introduce unwanted side effects. This CL modifies those failed reads to provide exactly 4 bytes. Additionally, this also replaces every accessors that uses enum to use uint32_t instead, since enum size is not guaranteed to be 4 bytes. Bug: 300418914 Tag: #floss Test: m -j Test: Manually, make sure we don't fail reading dev_type from storage by adding logs and just scan some advertisements. Change-Id: Ie2a880813ed5e4666813e02bb6914ae52950bb09
Loading
Please register or sign in to comment