am ef2f55d0: Add support to delete AVD in the new AvdSelector.

Merge commit 'ef2f55d0b70edcddeeeac7ad7cab0c8f115c0800'

* commit 'ef2f55d0b70edcddeeeac7ad7cab0c8f115c0800':
  Add support to delete AVD in the new AvdSelector.
This commit is contained in:
Xavier Ducrohet
2009-06-18 16:47:44 -07:00
committed by The Android Open Source Project
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.
*/