mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2025-01-26 16:41:43 +01:00
interrupt thread instead of joining to fix ANR
This commit is contained in:
parent
6895c5b776
commit
b1a93c430d
@ -48,11 +48,7 @@ public abstract class AbstractSerialDeviceSupport extends AbstractDeviceSupport
|
|||||||
// currently only one thread allowed
|
// currently only one thread allowed
|
||||||
if (gbDeviceIOThread != null) {
|
if (gbDeviceIOThread != null) {
|
||||||
gbDeviceIOThread.quit();
|
gbDeviceIOThread.quit();
|
||||||
try {
|
gbDeviceIOThread.interrupt();
|
||||||
gbDeviceIOThread.join();
|
|
||||||
} catch (InterruptedException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
gbDeviceIOThread = null;
|
gbDeviceIOThread = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user