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

Skip to content
Commit fdb3930b authored by Fabian Kozynski's avatar Fabian Kozynski
Browse files

Rewrite DeviceProvisionedController

The old version made IPC calls in the main thread. Instead, fix the
following:

1. Calls to settings provider are made in background thread, except
maybe on object creation to set initial state or if requesting the state
of a user that hasn't been started (unlikely).
2. Cache state of device_provisioned and each user (that has been
started) user_setup_complete
3. Do all operations in background (with proper locks) and notify in
main thread.
4. Use UserTracker to avoid calls to `ActivityManager`.
5. The tracker is always registered so no changes are missed, and we
don't need to retrieve cache every time we would register. The number of
calls from the system are pretty low any way.
6. Listeners are not called on addCallback. None of the listeners
expected this and at least one assumed that a call meant an actual
change in state.

Test: atest DeviceProvisionedControllerTest
Test: manual, things are not hopelessly broken
Fixes: 203138620
Change-Id: I9caccd7593732a07d688d5ca2f8de8cedb8b02ef
parent 4d242afb
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