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

Commit ab40b5f2 authored by Lorenzo Colitti's avatar Lorenzo Colitti
Browse files

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
parent 68da9a90
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment