refactoring

This commit is contained in:
Giemsa 2016-10-24 00:36:56 +09:00 committed by Samuel Carlsson
parent 76c9045b0c
commit af7b8ec5ab

View File

@ -48,23 +48,23 @@ public class JadbConnection implements ITransportFactory {
new Thread(new Runnable() {
@Override
public void run() {
try
{
try {
devices.send("host:track-devices");
devices.verifyResponse();
boolean r = false;
do {
List<JadbDevice> list = parseDevices(devices.readString());
r = listener.detect(list);
} while(r);
} catch(SocketException e) {
} while (r);
} catch (SocketException e) {
// socket closed from another thread
} catch(Exception e) {
} catch (Exception e) {
Thread t = Thread.currentThread();
t.getUncaughtExceptionHandler().uncaughtException(t, e);
}
}
}).start();
return new DeviceDetectionHandler(devices);
}