Add support to delete AVD in the new AvdSelector.

Also: change button order in the update chooser dialog.
This commit is contained in:
Xavier Ducrohet
2009-06-18 16:01:05 -07:00
parent 963aebaffa
commit ef2f55d0b7
4 changed files with 129 additions and 35 deletions

View File

@@ -433,35 +433,6 @@ class AvdManagerListPage extends WizardPage {
}
}
/**
* Triggered when the user selects the "delete" button (the extra action in the selector)
* Deletes the currently selected AVD, if any.
*
* This is obsolete. Kept around to reuse the code later in the AvdSelector itself.
*/
@Deprecated
private void onDelete() {
AvdInfo avdInfo = mAvdSelector.getSelected();
AvdManager avdm = getAvdManager();
if (avdInfo == null || avdm == null) {
return;
}
// Confirm you want to delete this AVD
if (!AdtPlugin.displayPrompt("Delete Android Virtual Device",
String.format("Please confirm that you want to delete the Android Virtual Device named '%s'. This operation cannot be reverted.",
avdInfo.getName()))) {
return;
}
SdkLog log = new SdkLog(String.format("Result of deleting AVD '%s':", avdInfo.getName()));
boolean success = avdm.deleteAvd(avdInfo, log);
log.display(success);
reloadAvdList();
}
/**
* Triggered when the user selects the "create" button.
*/