[Title] fixed to update devices's state after checking arch
authoryoonki.park <yoonki.park@samsung.com>
Wed, 28 Nov 2012 11:21:45 +0000 (20:21 +0900)
committeryoonki.park <yoonki.park@samsung.com>
Wed, 28 Nov 2012 11:21:45 +0000 (20:21 +0900)
[Type]
[Module]
[Priority]
[CQ#]
[Redmine#]
[Problem]
[Cause]
[Solution]
[TestCase]

Change-Id: Icec64c87167646d9e2876d084638643d8b9affa1

org.tizen.common.sdblib/src/org/tizen/sdblib/DeviceMonitor.java

index bcc82cf..1b65f22 100644 (file)
@@ -312,12 +312,13 @@ final class DeviceMonitor {
                             // update the state if needed.
                             if (device.getState() != newDevice.getState()) {
                                 device.setState(newDevice.getState());
-                                device.update(Device.CHANGE_STATE);
+
                                 //should to check architecture if device is an emulator and state changed from "off-lined" to "on-lined"
                                 if(device.isEmulator() && device.getState() == DeviceState.ONLINE)
                                 {
                                     device.checkArchitecture();
                                 }
+                                device.update(Device.CHANGE_STATE);
                             }
                             // remove the new device from the list since it's been used
                             newList.remove(dd);
@@ -346,11 +347,11 @@ final class DeviceMonitor {
                     }
                     // add them to the list
                     mDevices.add(newDevice);
-                    mServer.deviceConnected(newDevice);
 
                     // look for their build info.
                     if (newDevice.isOnline()) {
                         devicesToQuery.add(newDevice);
+                        mServer.deviceConnected(newDevice);
                     }
                 }
             }