mirror of
https://github.com/revanced/jadb.git
synced 2025-05-29 21:00:16 +02:00
refactoring
This commit is contained in:
parent
76c9045b0c
commit
af7b8ec5ab
@ -48,23 +48,23 @@ public class JadbConnection implements ITransportFactory {
|
|||||||
new Thread(new Runnable() {
|
new Thread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
try
|
try {
|
||||||
{
|
|
||||||
devices.send("host:track-devices");
|
devices.send("host:track-devices");
|
||||||
devices.verifyResponse();
|
devices.verifyResponse();
|
||||||
boolean r = false;
|
boolean r = false;
|
||||||
do {
|
do {
|
||||||
List<JadbDevice> list = parseDevices(devices.readString());
|
List<JadbDevice> list = parseDevices(devices.readString());
|
||||||
r = listener.detect(list);
|
r = listener.detect(list);
|
||||||
} while(r);
|
} while (r);
|
||||||
} catch(SocketException e) {
|
} catch (SocketException e) {
|
||||||
// socket closed from another thread
|
// socket closed from another thread
|
||||||
} catch(Exception e) {
|
} catch (Exception e) {
|
||||||
Thread t = Thread.currentThread();
|
Thread t = Thread.currentThread();
|
||||||
t.getUncaughtExceptionHandler().uncaughtException(t, e);
|
t.getUncaughtExceptionHandler().uncaughtException(t, e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
|
|
||||||
return new DeviceDetectionHandler(devices);
|
return new DeviceDetectionHandler(devices);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user