Skip to content
Commit 59f6f7ff authored by Annie Meng's avatar Annie Meng
Browse files

[Multi-user] Initialize user state in UserBMS

Move per-user state initialization (directories for bookkeeping data and
transport manager) from BMS to UserBMS.

The UserBMS constructor is now private and callers should use the static
helper to create a new instance. This is primarily for three reasons:
1) Allows for extracting logic out of the constructor into helpers.
2) Allows for performing necessary user-specific setup in the future
such as data migration.
3) Allows for writing unit tests without having setters/getters
exclusively for tests.

Bug: 120212806
Test: 1) atest RunFrameworksServicesRoboTests
2) boot -> unlock user -> service started and verify transports
registered
3) adb shell bmgr backupnow [package] -> writes to /data dir
   adb shell bmgr enable false -> writes to /data dir
4) adb shell bmgr backupnow --all -> writes to /cache dir

Change-Id: If88d95059951dbae0abf691629db1a05d27f743d
parent 604eb2a8
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