Code example for PowerManager

Methods: reboot

0
		.setMessage("do you really want to reboot ?")
		.setCancelable(false)
		.setPositiveButton("Reboot", new DialogInterface.OnClickListener() {
			@Override 
			public void onClick(DialogInterface dialog, int id) {
				pm.reboot("bootloader");
				finish();
			} 
		}) 
		.setNeutralButton("Cancel",new DialogInterface.OnClickListener() {
			public void onClick(DialogInterface dialog,int id) {
				dialog.cancel();
				finish();
			} 
		}); 
		AlertDialog alertDialog = alertDialogBuilder.create();
		alertDialog.show();
	} 
 
} 
Experience pair programming with AI  Get Codota for Java