Thread.State, Thread.UncaughtExceptionHandler
Modifier and Type | Field and Description |
---|---|
static String |
AUDIT_SAFEMODE_PROPERTY |
static String |
REBOOT_SAFEMODE_PROPERTY |
static String |
RO_SAFEMODE_PROPERTY |
static String |
SHUTDOWN_ACTION_PROPERTY |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Modifier and Type | Method and Description |
---|---|
static void |
reboot(Context context,
String reason,
boolean confirm)
Request a clean shutdown, waiting for subsystems to clean up their
state etc.
|
static void |
rebootOrShutdown(Context context,
boolean reboot,
String reason)
Do not call this directly.
|
static void |
rebootSafeMode(Context context,
boolean confirm)
Request a reboot into safe mode.
|
void |
run()
Makes sure we handle the shutdown gracefully.
|
static void |
shutdown(Context context,
String reason,
boolean confirm)
Request a clean shutdown, waiting for subsystems to clean up their
state etc.
|
activeCount, blockedOn, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, parkFor$, parkUntil$, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, unpark$, yield
public static final String SHUTDOWN_ACTION_PROPERTY
public static final String REBOOT_SAFEMODE_PROPERTY
public static final String RO_SAFEMODE_PROPERTY
public static final String AUDIT_SAFEMODE_PROPERTY
public static void shutdown(Context context, String reason, boolean confirm)
context
- Context used to display the shutdown progress dialog.reason
- code to pass to android_reboot() (e.g. "userrequested"), or null.confirm
- true if user confirmation is needed before shutting down.public static void reboot(Context context, String reason, boolean confirm)
context
- Context used to display the shutdown progress dialog.reason
- code to pass to the kernel (e.g. "recovery"), or null.confirm
- true if user confirmation is needed before shutting down.public static void rebootSafeMode(Context context, boolean confirm)
context
- Context used to display the shutdown progress dialog.confirm
- true if user confirmation is needed before shutting down.public void run()
run
in interface Runnable
run
in class Thread
Thread.start()
,
Thread.stop()
,
Thread.Thread(ThreadGroup, Runnable, String)
public static void rebootOrShutdown(Context context, boolean reboot, String reason)
reboot(Context, String, boolean)
or #shutdown(Context, boolean)
instead.context
- Context used to vibrate or null without vibrationreboot
- true to reboot or false to shutdownreason
- reason for reboot/shutdown