废话少说,直接上代码:
public void rebootAction(){
new AlertDialog.Builder(this)
.setTitle("Warning")
.setMessage("Sure to reboot?")
.setNegativeButton("Cancel", null)
.setPositiveButton("OK", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
String cmd