public final class PowerManagerService extends SystemService implements Watchdog.Monitor
Modifier and Type | Class and Description |
---|---|
static interface |
PowerManagerService.HaltMode
|
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 |
---|
PowerManagerService(Context context) |
Modifier and Type | Method and Description |
---|---|
static void |
lowLevelReboot(String reason)
Low-level function to reboot the device.
|
static void |
lowLevelShutdown(String reason)
Low-level function turn the device off immediately, without trying
to be clean.
|
void |
monitor() |
void |
onBootPhase(int phase)
Called on each phase of the boot process.
|
void |
onStart()
Called when the dependencies listed in the @Service class-annotation are available
and after the chosen start phase.
|
void |
systemReady(IAppOpsService appOps) |
getBinderService, getContext, getLocalService, isSafeMode, onCleanupUser, onStartUser, onStopUser, onSwitchUser, onUnlockUser, publishBinderService, publishBinderService, publishLocalService
public PowerManagerService(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 systemReady(IAppOpsService appOps)
public static void lowLevelShutdown(String reason)
ShutdownThread
for a clean shutdown.reason
- code to pass to android_reboot() (e.g. "userrequested"), or null.public static void lowLevelReboot(String reason)
reason
- code to pass to the kernel (e.g. "recovery"), or null.public void monitor()
monitor
in interface Watchdog.Monitor