api-impl/android/os/AsyncTask: always run on UI thread (lifted from marshmallow)

This commit is contained in:
Mis012
2023-08-04 17:09:04 +02:00
parent b4e1057dbc
commit ce32014fec

View File

@@ -639,6 +639,11 @@ public abstract class AsyncTask<Params, Progress, Result> {
}
private static class InternalHandler extends Handler {
/* undocumented change lifted from marshmallow; fixes crashes when the app uses this on a thread that doesn't have a looper */
public InternalHandler() {
super(Looper.getMainLooper());
}
@SuppressWarnings({"unchecked", "RawUseOfParameterizedType"})
@Override
public void handleMessage(Message msg) {