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

Commit 30a39027 authored by Matthew Xie's avatar Matthew Xie Committed by Android Git Automerger
Browse files

am 1c925069: am f1920d4f: am 842c1fe8: Merge "Bluetooth: GAP: Update bonded...

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

* commit '1c925069':
  Bluetooth: GAP: Update bonded device info immediately on NVRAM
parents 22883840 1c925069
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -783,7 +783,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;
}

@@ -805,7 +806,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;

}