public class SystemServiceManager extends Object
system services
.
Constructor and Description |
---|
SystemServiceManager(Context context) |
Modifier and Type | Method and Description |
---|---|
void |
cleanupUser(int userHandle) |
void |
dump()
Outputs the state of this manager to the System log.
|
boolean |
isSafeMode()
Returns whether we are booting into safe mode.
|
void |
setSafeMode(boolean safeMode)
Sets the safe mode flag for services to query.
|
void |
startBootPhase(int phase)
Starts the specified boot phase for all system services that have been started up to
this point.
|
<T extends SystemService> |
startService(Class<T> serviceClass)
Creates and starts a system service.
|
SystemService |
startService(String className)
Starts a service by class name.
|
void |
startUser(int userHandle) |
void |
stopUser(int userHandle) |
void |
switchUser(int userHandle) |
void |
unlockUser(int userHandle) |
public SystemServiceManager(Context context)
public SystemService startService(String className)
public <T extends SystemService> T startService(Class<T> serviceClass)
SystemService
.serviceClass
- A Java class that implements the SystemService interface.RuntimeException
- if the service fails to start.public void startBootPhase(int phase)
phase
- The boot phase to start.public void startUser(int userHandle)
public void unlockUser(int userHandle)
public void switchUser(int userHandle)
public void stopUser(int userHandle)
public void cleanupUser(int userHandle)
public void setSafeMode(boolean safeMode)
public boolean isSafeMode()
public void dump()