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:
tonihei 2017-09-08 07:54:10 -07:00 committed by Oliver Woodman
parent 8f43dcd424
commit ec38d0d8ab

View File

@ -420,8 +420,10 @@ public final class Loader implements LoaderErrorThrower {
@Override
public void run() {
if (getLooper().getThread().isAlive()) {
sendEmptyMessage(0);
}
}
@Override
public void handleMessage(Message msg) {