mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00
Check thread is still alive before sending message in Loader.
The release callback handler in Loader might not be alive anymore. Catch this case to prevent warnings about sending messages on dead threads. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=167996538
This commit is contained in:
parent
8f43dcd424
commit
ec38d0d8ab
@ -420,7 +420,9 @@ public final class Loader implements LoaderErrorThrower {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
sendEmptyMessage(0);
|
if (getLooper().getThread().isAlive()) {
|
||||||
|
sendEmptyMessage(0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
x
Reference in New Issue
Block a user