Merge change 20520 into donut
* changes: Fix IAndroidTarget#isCompatibleBaseFor() for add-ons
This commit is contained in:
@@ -81,7 +81,7 @@ public final class AvdSelector {
|
||||
private Button mNewButton;
|
||||
private Button mRefreshButton;
|
||||
private Button mManagerButton;
|
||||
private Button mUpdateButton;
|
||||
private Button mRepairButton;
|
||||
private Button mStartButton;
|
||||
|
||||
private SelectionListener mSelectionListener;
|
||||
@@ -256,14 +256,14 @@ public final class AvdSelector {
|
||||
}
|
||||
});
|
||||
|
||||
mUpdateButton = new Button(buttons, SWT.PUSH | SWT.FLAT);
|
||||
mUpdateButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
|
||||
mUpdateButton.setText("Update...");
|
||||
mUpdateButton.setToolTipText("Updates the path of the selected AVD.");
|
||||
mUpdateButton.addSelectionListener(new SelectionAdapter() {
|
||||
mRepairButton = new Button(buttons, SWT.PUSH | SWT.FLAT);
|
||||
mRepairButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
|
||||
mRepairButton.setText("Repair...");
|
||||
mRepairButton.setToolTipText("Repairs the selected AVD.");
|
||||
mRepairButton.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent arg0) {
|
||||
onUpdate();
|
||||
onRepair();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -775,8 +775,8 @@ public final class AvdSelector {
|
||||
if (mDeleteButton != null) {
|
||||
mDeleteButton.setEnabled(false);
|
||||
}
|
||||
if (mUpdateButton != null) {
|
||||
mUpdateButton.setEnabled(false);
|
||||
if (mRepairButton != null) {
|
||||
mRepairButton.setEnabled(false);
|
||||
}
|
||||
} else {
|
||||
AvdInfo selection = getTableSelection();
|
||||
@@ -790,8 +790,8 @@ public final class AvdSelector {
|
||||
if (mDeleteButton != null) {
|
||||
mDeleteButton.setEnabled(hasSelection);
|
||||
}
|
||||
if (mUpdateButton != null) {
|
||||
mUpdateButton.setEnabled(hasSelection &&
|
||||
if (mRepairButton != null) {
|
||||
mRepairButton.setEnabled(hasSelection &&
|
||||
selection.getStatus() == AvdStatus.ERROR_IMAGE_DIR);
|
||||
}
|
||||
}
|
||||
@@ -851,7 +851,12 @@ public final class AvdSelector {
|
||||
}
|
||||
}
|
||||
|
||||
private void onUpdate() {
|
||||
/**
|
||||
* Repairs the selected AVD.
|
||||
* <p/>
|
||||
* For now this only supports fixing the wrong value in image.sysdir.*
|
||||
*/
|
||||
private void onRepair() {
|
||||
final AvdInfo avdInfo = getTableSelection();
|
||||
|
||||
// get the current Display
|
||||
|
||||
Reference in New Issue
Block a user