Add a missing write lock to settings state.

Atomic file requires sync between writers otherwise we may end
up with partially written settings file and no backup to recover.

Test: not testable by how we hold a mutex

bug:35915719

Change-Id: I97eebf869fa7e4989dcd2a29e4418c22706edcb8
(cherry picked from commit 480b570603df7c7b63372483923239f57a1468b4)
1 file changed