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

Commit 1c925069 authored by Matthew Xie's avatar Matthew Xie Committed by Android Git Automerger
Browse files

am f1920d4f: am 842c1fe8: Merge "Bluetooth: GAP: Update bonded device info immediately on NVRAM"

* commit 'f1920d4f':
  Bluetooth: GAP: Update bonded device info immediately on NVRAM
parents 5a23f7e0 f1920d4f
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -784,7 +784,8 @@ bt_status_t btif_storage_add_bonded_device(bt_bdaddr_t *remote_bd_addr,
    int ret = btif_config_set_int("Remote", bdstr, "LinkKeyType", (int)key_type);
    ret &= btif_config_set_int("Remote", bdstr, "PinLength", (int)pin_length);
    ret &= btif_config_set("Remote", bdstr, "LinkKey", (const char*)link_key, sizeof(LINK_KEY), BTIF_CFG_TYPE_BIN);
    btif_config_save();
    /* write bonded info immediately */
    btif_config_flush();
    return ret ? BT_STATUS_SUCCESS : BT_STATUS_FAIL;
}

@@ -806,7 +807,8 @@ bt_status_t btif_storage_remove_bonded_device(bt_bdaddr_t *remote_bd_addr)
    int ret = btif_config_remove("Remote", bdstr, "LinkKeyType");
    ret &= btif_config_remove("Remote", bdstr, "PinLength");
    ret &= btif_config_remove("Remote", bdstr, "LinkKey");
    btif_config_save();
    /* write bonded info immediately */
    btif_config_flush();
    return ret ? BT_STATUS_SUCCESS : BT_STATUS_FAIL;

}