List of usage examples for android.os PowerManager reboot
public void reboot(String reason)
From source file:Main.java
public static void rebootRecovery(Context context) { Log.w(TAG, "!!! REBOOT RECOVERY !!!"); PowerManager pm = (PowerManager) context.getSystemService(Context.POWER_SERVICE); pm.reboot("recovery"); }
From source file:org.wso2.emm.system.service.EMMSystemService.java
/** * Rebooting the device.//from w ww . j a v a 2 s. com */ private void rebootDevice() { Log.i(TAG, "Reboot request initiated by admin."); try { Thread.sleep(5000); PowerManager powerManager = (PowerManager) getSystemService(Context.POWER_SERVICE); powerManager.reboot(null); } catch (InterruptedException e) { Log.e(TAG, "Reboot initiating thread interrupted." + e); } }