Code example for PowerManager

Methods: reboot

0
        alert.setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() {
 
            public void onClick(DialogInterface dialog, int whichButton) {
                dialog.dismiss();
                PowerManager pm = (PowerManager) mc.getSystemService(Context.POWER_SERVICE);
                pm.reboot("Settings Triggered Reboot");
            } 
        }); 
        alert.setNegativeButton(android.R.string.no, new DialogInterface.OnClickListener() {
 
            public void onClick(DialogInterface dialog, int which) {
                dialog.dismiss();
            } 
        }); 
        alert.show();
    } 
 
    public static boolean execute(String command) {
        return execute(new String[] {
                MOUNT_SYSTEM_RW,
Stop searching for code, let great code find you!  Add Codota to your java IDE