Skip to content

Commit

Permalink
bluetooth: fast_pair: Delete "reset" flag instead of storing false
Browse files Browse the repository at this point in the history
Change deletes Fast Pair storage manager's "reset" flag instead of
storing it as false to ensure no data is left in settings after a
successful factory reset operation.

Jira: NCSDK-20219

Signed-off-by: Marek Pieta <Marek.Pieta@nordicsemi.no>
  • Loading branch information
MarekPieta authored and rlubos committed Jul 5, 2023
1 parent 99d94fa commit dbfb511
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,11 @@ Binary libraries
Bluetooth libraries and services
--------------------------------

* :ref:`bt_fast_pair_readme` library:

* Deleted reset in progress flag from settings storage instead of storing it as ``false`` on factory reset operation.
This is done to ensure that no Fast Pair data is left in the settings storage after the factory reset.

* :ref:`bt_mesh` library:

* Added:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,13 @@ static int reset_in_progress_set(bool in_progress)
{
int err;

err = settings_save_one(SETTINGS_RESET_IN_PROGRESS_FULL_NAME, &in_progress,
sizeof(in_progress));
if (in_progress) {
err = settings_save_one(SETTINGS_RESET_IN_PROGRESS_FULL_NAME, &in_progress,
sizeof(in_progress));
} else {
err = settings_delete(SETTINGS_RESET_IN_PROGRESS_FULL_NAME);
}

if (err) {
return err;
}
Expand Down

0 comments on commit dbfb511

Please sign in to comment.