Authentication is failed between Android Q and Android P or earlier when derived link key is used.
Repro steps:
1. Try to LE connect & pair(LE secure connection) with Android P device from Android Q device
2. Try to connect PAN from Android Q device to Android P device
3. Connection failed
This issue is caused by the following change.
https://android.googlesource.com/platform/system/bt/+/
ae57211e7c6ef25788369052817403e30cc9f06f
This fix just reverts removed line from the previous change.
Bug:
143940249
Change-Id: I5d18cdd76b6c436dad010caf514ab0d78997f091
link_key_type += BTM_LTK_DERIVED_LKEY_OFFSET;
- Octet16 notif_link_key = link_key;
+ Octet16 notif_link_key;
+ std::reverse_copy(link_key.begin(), link_key.end(), notif_link_key.begin());
btm_sec_link_key_notification(bda_for_lk, notif_link_key, link_key_type);
SMP_TRACE_EVENT("%s is completed", __func__);