1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-24 19:06:53 +01:00

interrupt thread instead of joining to fix ANR

This commit is contained in:
Andreas Shimokawa 2016-04-07 00:21:21 +02:00
parent 6895c5b776
commit b1a93c430d

View File

@ -48,11 +48,7 @@ public abstract class AbstractSerialDeviceSupport extends AbstractDeviceSupport
// currently only one thread allowed
if (gbDeviceIOThread != null) {
gbDeviceIOThread.quit();
try {
gbDeviceIOThread.join();
} catch (InterruptedException e) {
e.printStackTrace();
}
gbDeviceIOThread.interrupt();
gbDeviceIOThread = null;
}
}