/** * Request a clean shutdown, waiting for subsystems to clean up their state etc. Must be called * from a Looper thread in which its UI is shown. * * @param context Context used to display the shutdown progress dialog. * @param reason code to pass to the kernel (e.g. "recovery"), or null. * @param confirm true if user confirmation is needed before shutting down. */ public static void reboot(final Context context, String reason, boolean confirm) { mReboot = true; mRebootSafeMode = false; mRebootReason = reason; shutdownInner(context, confirm); }
/** * Request a reboot into safe mode. Must be called from a Looper thread in which its UI is shown. * * @param context Context used to display the shutdown progress dialog. * @param confirm true if user confirmation is needed before shutting down. */ public static void rebootSafeMode(final Context context, boolean confirm) { mReboot = true; mRebootSafeMode = true; mRebootReason = null; shutdownInner(context, confirm); }
/** * Request a clean shutdown, waiting for subsystems to clean up their state etc. Must be called * from a Looper thread in which its UI is shown. * * @param context Context used to display the shutdown progress dialog. * @param confirm true if user confirmation is needed before shutting down. */ public static void shutdown(final Context context, boolean confirm) { mReboot = false; mRebootSafeMode = false; shutdownInner(context, confirm); }