diff options
author | Xavier Ducrohet <xav@android.com> | 2010-08-31 10:36:01 -0700 |
---|---|---|
committer | Xavier Ducrohet <xav@android.com> | 2010-08-31 10:43:23 -0700 |
commit | 0b5b3edc79c75602b269fa9a0fdca842b408c4d5 (patch) | |
tree | 24b5d551881ba1b103a755f0abf5827a6adb63d6 /eclipse/plugins | |
parent | c784afa7fda424961b9e80c3cd820c2382d793e3 (diff) | |
download | sdk-0b5b3edc79c75602b269fa9a0fdca842b408c4d5.zip sdk-0b5b3edc79c75602b269fa9a0fdca842b408c4d5.tar.gz sdk-0b5b3edc79c75602b269fa9a0fdca842b408c4d5.tar.bz2 |
Make the HierarchyViewer plug-in not screw up DDMS.
The HV plug-in behaved like the standalone app and initialized
the AndroidDebugBridge with no client support (even though
this init is handled by DDMS) and would recreate the bridge
object destroying the one created by DDMS.
This completely broke DDMS.
Change-Id: Ife1187c74daef69607d508aabb1f7234507a170f
Diffstat (limited to 'eclipse/plugins')
-rw-r--r-- | eclipse/plugins/com.android.ide.eclipse.hierarchyviewer/src/com/android/ide/eclipse/hierarchyviewer/HierarchyViewerPlugin.java | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/eclipse/plugins/com.android.ide.eclipse.hierarchyviewer/src/com/android/ide/eclipse/hierarchyviewer/HierarchyViewerPlugin.java b/eclipse/plugins/com.android.ide.eclipse.hierarchyviewer/src/com/android/ide/eclipse/hierarchyviewer/HierarchyViewerPlugin.java index 8f94c65..959bf6c 100644 --- a/eclipse/plugins/com.android.ide.eclipse.hierarchyviewer/src/com/android/ide/eclipse/hierarchyviewer/HierarchyViewerPlugin.java +++ b/eclipse/plugins/com.android.ide.eclipse.hierarchyviewer/src/com/android/ide/eclipse/hierarchyviewer/HierarchyViewerPlugin.java @@ -58,7 +58,7 @@ public class HierarchyViewerPlugin extends AbstractUIPlugin { public void start(BundleContext context) throws Exception { super.start(context); sPlugin = this; - + // set the consoles. final MessageConsole messageConsole = new MessageConsole("Hierarchy Viewer", null); //$NON-NLS-1$ @@ -115,9 +115,10 @@ public class HierarchyViewerPlugin extends AbstractUIPlugin { new Thread() { @Override public void run() { - director.initDebugBridge(); - director.startListenForDevices(); - director.populateDeviceSelectionModel(); + if (director.acquireBridge()) { + director.startListenForDevices(); + director.populateDeviceSelectionModel(); + } } }.start(); } @@ -143,7 +144,7 @@ public class HierarchyViewerPlugin extends AbstractUIPlugin { /** * Returns the shared instance - * + * * @return the shared instance */ public static HierarchyViewerPlugin getPlugin() { @@ -152,7 +153,7 @@ public class HierarchyViewerPlugin extends AbstractUIPlugin { /** * Set the location of the adb executable and optionally starts adb - * + * * @param adb location of adb * @param startAdb flag to start adb */ @@ -177,7 +178,7 @@ public class HierarchyViewerPlugin extends AbstractUIPlugin { /** * Prints a message, associated with a project to the specified stream - * + * * @param stream The stream to write to * @param tag The tag associated to the message. Can be null * @param message The message to print. @@ -192,7 +193,7 @@ public class HierarchyViewerPlugin extends AbstractUIPlugin { /** * Creates a string containing the current date/time, and the tag - * + * * @param tag The tag associated to the message. Can be null * @return The dateTag */ |