Code example for PowerManager

Methods: reboot

1
     * TODO: Not ready yet 
     */ 
    @TargetApi(8) 
    public void reboot() { 
        PowerManager pm = (PowerManager) context.getSystemService(Context.POWER_SERVICE);
        pm.reboot("recovery");
        pm.reboot(null);
 
        // not working: 
        // reboot(null); 
    } 
 
    /** 
     * Reboot the device immediately, passing 'reason' (may be null) to the underlying __reboot 
     * system call. Should not return. 
     *  
     * Taken from com.android.server.PowerManagerService.reboot 
     */ 
    // public void reboot(String reason) { 
    // 
    // // final String finalReason = reason;