mirror of
https://github.com/xoureldeen/Vectras-VM-Android.git
synced 2026-04-29 23:09:48 +00:00
20H18D16092024
This commit is contained in:
parent
de5b21869a
commit
62fadb00f1
5 changed files with 59 additions and 0 deletions
|
|
@ -706,6 +706,18 @@ public class MainActivity extends AppCompatActivity {
|
|||
|
||||
} else if (id == R.id.arch) {
|
||||
startActivity(new Intent(activity, SetArchActivity.class));
|
||||
} else if (id == R.id.shutdown) {
|
||||
AlertDialog alertDialog = new AlertDialog.Builder(activity, R.style.MainDialogTheme).create();
|
||||
alertDialog.setTitle("Do you want to kill all Qemu processes?");
|
||||
alertDialog.setMessage("All running VMs will be forcibly shut down.");
|
||||
alertDialog.setCancelable(true);
|
||||
alertDialog.setButton(DialogInterface.BUTTON_POSITIVE, "Kill all", (dialog, which) -> {
|
||||
VectrasApp.killallqemuprocesses(getApplicationContext());
|
||||
});
|
||||
alertDialog.setButton(DialogInterface.BUTTON_NEGATIVE, "Cancel", (dialog, which) -> {
|
||||
|
||||
});
|
||||
alertDialog.show();
|
||||
}
|
||||
|
||||
return super.onOptionsItemSelected(item);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue