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

Commit ceebba9b authored by Jack He's avatar Jack He
Browse files

GD-HCI: Write empty value to storage instead of nullptr

* GD storage layer forbids writing nullptr
* Fix the instance in legacy stack that writes a nullptr when it
  wants to write an empty value

Bug: 164979578
Tag: #gd-refactor
Test: pair with hearing aid devices
Change-Id: I8280c66f6862f92a9fbcb87b1a1216d59ad2983d
parent 2d113d89
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -2582,7 +2582,8 @@ void btif_dm_save_ble_bonding_keys(RawAddress& bd_addr) {
  }

  if (pairing_cb.ble.is_lidk_key_rcvd) {
    btif_storage_add_ble_bonding_key(&bd_addr, NULL, BTIF_DM_LE_KEY_LID, 0);
    uint8_t empty[] = {};
    btif_storage_add_ble_bonding_key(&bd_addr, empty, BTIF_DM_LE_KEY_LID, 0);
  }
}