Added SmartDevelopmentBridge#isDeviceListInitialized() for event-injector
authorkh5325.kim <kh5325.kim@samsung.com>
Wed, 22 May 2013 13:25:44 +0000 (22:25 +0900)
committerkh5325.kim <kh5325.kim@samsung.com>
Wed, 22 May 2013 13:25:44 +0000 (22:25 +0900)
org.tizen.common.sdblib/src/org/tizen/sdblib/DeviceMonitor.java
org.tizen.common.sdblib/src/org/tizen/sdblib/SmartDevelopmentBridge.java

index 56907e0..7fe4832 100644 (file)
@@ -63,6 +63,7 @@ extends AbstractServer
     private SocketChannel mMainSdbConnection = null;
     private boolean mMonitoring = false;
     private int mRestartAttemptCount = 0;
+    private boolean mDeviceListInitialized = false;
 
     ArchInfoReceiver receiver = null;
 
@@ -94,6 +95,10 @@ extends AbstractServer
         return mRestartAttemptCount;
     }
 
+    boolean isDeviceListInitialized() {
+        return mDeviceListInitialized;
+    }
+
     /**
      * Returns the devices.
      */
@@ -396,6 +401,7 @@ extends AbstractServer
 
                                        // flag the fact that we have build the list at least
                                        // once.
+                                       mDeviceListInitialized = true;
                                }
                        }
                } catch (AsynchronousCloseException ace) {
index 41d1892..2403a13 100644 (file)
@@ -359,6 +359,10 @@ public final class SmartDevelopmentBridge {
         return -1;
     }
 
+    public boolean isDeviceListInitialized() {
+        return (deviceMonitor != null) ? deviceMonitor.isDeviceListInitialized() : false;
+    }
+
     /**
      * Creates a new bridge.
      * @param osLocation the location of the command line tool