aboutsummaryrefslogtreecommitdiffstats
path: root/ddms
diff options
context:
space:
mode:
authorXavier Ducrohet <xav@android.com>2011-04-06 18:50:35 -0700
committerXavier Ducrohet <xav@android.com>2011-04-06 18:50:35 -0700
commit793de5db678784421c945e8dd0a6e10fce0d0494 (patch)
treea2ce96cf9eb26f8d802c2d28c39de2d8c2a19ca5 /ddms
parente5842c2be1c196db38dbdd74c25c1436fa656095 (diff)
downloadsdk-793de5db678784421c945e8dd0a6e10fce0d0494.zip
sdk-793de5db678784421c945e8dd0a6e10fce0d0494.tar.gz
sdk-793de5db678784421c945e8dd0a6e10fce0d0494.tar.bz2
Reset sInitialized when calling AndroidDebugBridge.terminate().
This will allow calling init() again after a terminate(). Change-Id: Icdda999624f13485f419ae53bc2139a5ceaa3229
Diffstat (limited to 'ddms')
-rw-r--r--ddms/libs/ddmlib/src/com/android/ddmlib/AndroidDebugBridge.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/ddms/libs/ddmlib/src/com/android/ddmlib/AndroidDebugBridge.java b/ddms/libs/ddmlib/src/com/android/ddmlib/AndroidDebugBridge.java
index e965ccd..f697cba 100644
--- a/ddms/libs/ddmlib/src/com/android/ddmlib/AndroidDebugBridge.java
+++ b/ddms/libs/ddmlib/src/com/android/ddmlib/AndroidDebugBridge.java
@@ -200,7 +200,7 @@ public final class AndroidDebugBridge {
/**
* Terminates the ddm library. This must be called upon application termination.
*/
- public static void terminate() {
+ public static synchronized void terminate() {
// kill the monitoring services
if (sThis != null && sThis.mDeviceMonitor != null) {
sThis.mDeviceMonitor.stop();
@@ -211,6 +211,8 @@ public final class AndroidDebugBridge {
if (monitorThread != null) {
monitorThread.quit();
}
+
+ sInitialized = false;
}
/**