Skip to content
Commit 29c75abf authored by Ram Periathiruvadi's avatar Ram Periathiruvadi
Browse files

Resolve trust agents on USER_STARTED in addition to USER_ADDED.

ACTION_USER_ADDED is a broadcast that is sent once when the user is
created.  TrustManagerService resolves the enabled trust agents for an
user only when the user is created.  However, if there is a reboot or
power loss before the broadcast is received, the trust agents are never
resolved for that user.

This change also registers for ACTION_USER_STARTED, so the service
checks for enabled trust agents on every boot.  If the trust agents have
been already resolved and initialized for that users, there is already a
Secure Settings key (TRUST_AGENTS_INITIALIZED) that is turned on, so we
wouldn't be doing this more than once per user.

Bug: 150145767
Test: TrustManagerService resolves trust agents only once - either on
USER_ADDED or USER_STARTED.

Change-Id: I83c2dd02d4b476f8b85af1aa4d9d0c77095207ce
parent 353d26c8
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