Make FakeSettingsProvider multiuser aware, take 2.
This allows reading and writing settings with the
{get,put}StringForUser methods.
Compared to the previous version of the CL, which was reverted:
- Always read and write Global settings as USER_SYSTEM, because
that's what SettingsProvider does,
- Don't throw UOE when removing settings in tables that were
never written to.
- Treat USER_NULL as the current user, since many tests seem to
write settings before initializing their multiuser code.
- Use the current userId if the caller does not pass in a userId,
since in-process reads never pass in a userId.
Bug: 397521796
Flag: TEST_ONLY
Test: new unit tests
Test: passes HSUM presubmit: https://android-build.corp.google.com/builds/abtd/run/L55100030013022217
Test: atest PowerServiceTests_server_power
Test: atest DisplayServiceTests_server_display
Change-Id: I4aba97c1b49830a0a353f391b0cc95ae3a0941d0
Loading
Please register or sign in to comment