赞
踩
ShutdownThread包含过具体关机和关机动画处理.
ShutdownThread.java
public static void shutdown(final Context context, String reason, boolean confirm) {
mReboot = false;
mRebootSafeMode = false;
mReason = reason;
shutdownInner(context, confirm);
}
public static void reboot(final Context context, String reason, boolean confirm) {
mReboot = true;
mRebootSafeMode = false;
mRebootHasProgressBar = false;
mReason = reason;
shutdownInner(context, confirm);
}
上面分别是关机和重启的方法,差别在于mReboot的值.
private static void shutdownInner(final Context context, boolean confirm) {
.....
if (confirm) {
....
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。