d/android: Stop thread function when device destoryed

This commit is contained in:
Jarvis Huang 2021-10-27 12:35:14 +08:00 committed by Ryan Pavlik
parent 6a61ed5695
commit 52cb2ef123

View file

@ -112,7 +112,7 @@ android_run_thread(void *ptr)
}
int ret = 0;
while (ret != ALOOPER_POLL_ERROR) {
while (d->oth.running && ret != ALOOPER_POLL_ERROR) {
ret = ALooper_pollAll(0, NULL, NULL, NULL);
}