/**
* 重启
*/
public void reboot() {
try {
PowerManager powerManager = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE);
powerManager.reboot("reboot");
} catch (Exception e) {
e.printStackTrace();
}
}
/**
* 关机
*/
public void shutdown() {
try {
PowerManager powerManager = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE);
powerManager.shutdown(false, "shutdown", false);
} catch (Exception e) {
e.printStackTrace();
}
}
/**
转载请注明出处,谢谢!高通Android 12/13 关机重启功能-CSDN博客