diff options
author | Bonyong.lee <bonyong.lee@samsung.com> | 2013-05-23 19:25:30 +0900 |
---|---|---|
committer | Bonyong.lee <bonyong.lee@samsung.com> | 2013-05-23 19:25:30 +0900 |
commit | 6cf1a30c22837eb6b6483d7564072c7595a00aa6 (patch) | |
tree | 27a60fff131509a85898e387ae7c4562de5c853e /org.tizen.common.sdblib | |
parent | bbc76319ec786bbfc9084ed5dc7c3cc716429e57 (diff) | |
download | common-eplugin-6cf1a30c22837eb6b6483d7564072c7595a00aa6.tar.gz common-eplugin-6cf1a30c22837eb6b6483d7564072c7595a00aa6.tar.bz2 common-eplugin-6cf1a30c22837eb6b6483d7564072c7595a00aa6.zip |
[Title] Refactoring sdblib
[Desc.] Restore ordered lock
[Issue]
Diffstat (limited to 'org.tizen.common.sdblib')
-rw-r--r-- | org.tizen.common.sdblib/src/org/tizen/sdblib/DeviceMonitor.java | 11 | ||||
-rw-r--r-- | org.tizen.common.sdblib/src/org/tizen/sdblib/SmartDevelopmentBridge.java | 1 |
2 files changed, 7 insertions, 5 deletions
diff --git a/org.tizen.common.sdblib/src/org/tizen/sdblib/DeviceMonitor.java b/org.tizen.common.sdblib/src/org/tizen/sdblib/DeviceMonitor.java index 209ff525c..221d24582 100644 --- a/org.tizen.common.sdblib/src/org/tizen/sdblib/DeviceMonitor.java +++ b/org.tizen.common.sdblib/src/org/tizen/sdblib/DeviceMonitor.java @@ -157,10 +157,13 @@ extends AbstractServer Log.d("DeviceMonitor", "connecting to sdb for Device List Monitoring..."); try { - return SmartDevelopmentBridge.getBridge().openChannel(); + final SocketChannel channel = SmartDevelopmentBridge.getBridge().openChannel(); + bridge.setStarted( true ); + return channel; + } catch (IOException e) { - Log.e("DeviceMonitor", "Failed to open socket channel" ); - Log.e("DeviceMonitor", e ); + Log.e("DeviceMonitor", "Failed to open socket channel" ); + Log.e("DeviceMonitor", e ); } return null; } @@ -229,7 +232,7 @@ extends AbstractServer /** * Updates the device list with the new items received from the monitoring service. */ - synchronized protected + protected void updateDevices( final ArrayList<Device> newList diff --git a/org.tizen.common.sdblib/src/org/tizen/sdblib/SmartDevelopmentBridge.java b/org.tizen.common.sdblib/src/org/tizen/sdblib/SmartDevelopmentBridge.java index 5fcddb00d..5a7aaecdf 100644 --- a/org.tizen.common.sdblib/src/org/tizen/sdblib/SmartDevelopmentBridge.java +++ b/org.tizen.common.sdblib/src/org/tizen/sdblib/SmartDevelopmentBridge.java @@ -392,7 +392,6 @@ public final class SmartDevelopmentBridge { // now that the bridge is connected, we start the underlying services. deviceMonitor = new DeviceMonitor(this); deviceMonitor.boot(); - setStarted( true ); return true; } catch (ServerException e) |