public class TrustManagerService extends SystemService
TrustAgentService
s
of each user and notifies them about events that are relevant to them.
It start and stops them based on the value of
LockPatternUtils.getEnabledTrustAgents(int)
.
It also keeps a set of android.app.trust.ITrustListener
s that are notified whenever the
trust state changes for any user.
Trust state and the setting of enabled agents is kept per user and each user has its own
instance of a TrustAgentService
.PHASE_ACTIVITY_MANAGER_READY, PHASE_BOOT_COMPLETED, PHASE_LOCK_SETTINGS_READY, PHASE_SYSTEM_SERVICES_READY, PHASE_THIRD_PARTY_APPS_CAN_START, PHASE_WAIT_FOR_DEFAULT_DISPLAY
Constructor and Description |
---|
TrustManagerService(Context context) |
Modifier and Type | Method and Description |
---|---|
void |
onBootPhase(int phase)
Called on each phase of the boot process.
|
void |
onCleanupUser(int userId)
Called when an existing user is stopping, for system services to finalize any per-user
state they maintain for running users.
|
void |
onStart()
Called when the dependencies listed in the @Service class-annotation are available
and after the chosen start phase.
|
void |
onStartUser(int userId)
Called when a new user is starting, for system services to initialize any per-user
state they maintain for running users.
|
void |
onSwitchUser(int userId)
Called when switching to a different foreground user, for system services that have
special behavior for whichever user is currently in the foreground.
|
void |
onUnlockUser(int userId)
Called when an existing user is unlocked.
|
void |
resetAgent(ComponentName name,
int userId) |
void |
updateTrust(int userId,
int flags) |
getBinderService, getContext, getLocalService, isSafeMode, onStopUser, publishBinderService, publishBinderService, publishLocalService
public TrustManagerService(Context context)
public void onStart()
SystemService
onStart
in class SystemService
public void onBootPhase(int phase)
SystemService
onBootPhase
in class SystemService
phase
- The current boot phase.public void updateTrust(int userId, int flags)
public void resetAgent(ComponentName name, int userId)
public void onStartUser(int userId)
SystemService
onStartUser
in class SystemService
userId
- The identifier of the user.public void onCleanupUser(int userId)
SystemService
onCleanupUser
in class SystemService
userId
- The identifier of the user.public void onSwitchUser(int userId)
SystemService
onSwitchUser
in class SystemService
userId
- The identifier of the user.public void onUnlockUser(int userId)
SystemService
onUnlockUser
in class SystemService
userId
- The identifier of the user.