AI 144252: Reload AVDs when displaying the run/debug launch dialog (bug #1683892)
BUG=1683892 Automated import of CL 144252
This commit is contained in:
committed by
The Android Open Source Project
parent
dfa5494492
commit
a248b46de4
@@ -21,6 +21,7 @@ import com.android.ide.eclipse.adt.launch.AndroidLaunchConfiguration.TargetMode;
|
|||||||
import com.android.ide.eclipse.adt.sdk.Sdk;
|
import com.android.ide.eclipse.adt.sdk.Sdk;
|
||||||
import com.android.ide.eclipse.common.project.BaseProjectHelper;
|
import com.android.ide.eclipse.common.project.BaseProjectHelper;
|
||||||
import com.android.ide.eclipse.ddms.DdmsPlugin;
|
import com.android.ide.eclipse.ddms.DdmsPlugin;
|
||||||
|
import com.android.prefs.AndroidLocation.AndroidLocationException;
|
||||||
import com.android.sdklib.IAndroidTarget;
|
import com.android.sdklib.IAndroidTarget;
|
||||||
import com.android.sdklib.avd.AvdManager;
|
import com.android.sdklib.avd.AvdManager;
|
||||||
import com.android.sdklib.avd.AvdManager.AvdInfo;
|
import com.android.sdklib.avd.AvdManager.AvdInfo;
|
||||||
@@ -127,6 +128,14 @@ public class EmulatorConfigTab extends AbstractLaunchConfigurationTab {
|
|||||||
public void createControl(Composite parent) {
|
public void createControl(Composite parent) {
|
||||||
Font font = parent.getFont();
|
Font font = parent.getFont();
|
||||||
|
|
||||||
|
// reload the AVDs to make sure we are up to date
|
||||||
|
try {
|
||||||
|
Sdk.getCurrent().getAvdManager().reloadAvds();
|
||||||
|
} catch (AndroidLocationException e1) {
|
||||||
|
// this happens if the AVD Manager failed to find the folder in which the AVDs are
|
||||||
|
// stored. There isn't much we can do at this point.
|
||||||
|
}
|
||||||
|
|
||||||
Composite topComp = new Composite(parent, SWT.NONE);
|
Composite topComp = new Composite(parent, SWT.NONE);
|
||||||
setControl(topComp);
|
setControl(topComp);
|
||||||
GridLayout topLayout = new GridLayout();
|
GridLayout topLayout = new GridLayout();
|
||||||
|
|||||||
Reference in New Issue
Block a user