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

Skip to content
Commit 3c8fe2f1 authored by Dennis Shen's avatar Dennis Shen
Browse files

system_server: bulk sync between old storage and new aconfig storage

message.

Do a bulk flag overrides sync when settings provider is initilized. At
the core, old storage data is stored inside SettingsState class. As the
last step of SettingState constructor, we handle bulk sync request. The
entry point of bulk sync is "handleBulkSyncToNewStorage" call in
SettingsState constructor.

When handling bulk sync requests, we use a setting entry in mSettings as
a marker to indicate if bulk sync has been performed. There are four
possibilities in each boot:

(1) enableAconfigStorageDaemon is on, but marker is false or no there (a setting entry in
mSettings) showing that bulk sync has been done. In this case, do a
bulkd sync, and then writes marker to mSettings and writes to xml file,
so that the marker persists.

(2) enableAconfigStorageDaemon is on, and marker is true. It means we have bulk
synced already, no need to do it again. Nothing to do in this case.

(3) enableAconfigStorageDaemon is off, and maker is true. Then we should clear the
marker from mSettings and trigger a write to xml file.

(4) enableAconfigStorageDaemon is off, and marker is false. Nothing to do in this case.

For bulk sync logic, it does the following things:

(1) write a storage reset request to aconfigd, ensure aconfigd is in
clean state before sync over any flags.

(2) loop over each setting and send over flag override requests.

Bug: b/312444587
Test: m and avd, tested with both server and local overrides
Change-Id: I1e0370da7516cd4cfaec94d428943d8e840b725e
parent c75b268e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment