From 9ab64adfc412b1df4c91e2e555ed1fbf0134254b Mon Sep 17 00:00:00 2001 From: Xavier Ducrohet <> Date: Thu, 2 Apr 2009 22:46:50 -0700 Subject: [PATCH] AI 144394: am: CL 144254 am: CL 144252 Reload AVDs when displaying the run/debug launch dialog (bug #1683892) Original author: xav Merged from: //branches/cupcake/... Original author: android-build Automated import of CL 144394 --- .../com/android/ide/eclipse/adt/launch/EmulatorConfigTab.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/launch/EmulatorConfigTab.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/launch/EmulatorConfigTab.java index 3789153e4..24380eb62 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/launch/EmulatorConfigTab.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/launch/EmulatorConfigTab.java @@ -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.common.project.BaseProjectHelper; import com.android.ide.eclipse.ddms.DdmsPlugin; +import com.android.prefs.AndroidLocation.AndroidLocationException; import com.android.sdklib.IAndroidTarget; import com.android.sdklib.avd.AvdManager; import com.android.sdklib.avd.AvdManager.AvdInfo; @@ -126,6 +127,14 @@ public class EmulatorConfigTab extends AbstractLaunchConfigurationTab { */ public void createControl(Composite parent) { 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); setControl(topComp); -- 2.11.0