You've already forked android_translation_layer
mirror of
https://gitlab.com/android_translation_layer/android_translation_layer.git
synced 2025-10-27 11:48:10 -07:00
api-impl/android/os/AsyncTask: always run on UI thread (lifted from marshmallow)
This commit is contained in:
@@ -639,6 +639,11 @@ public abstract class AsyncTask<Params, Progress, Result> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class InternalHandler extends Handler {
|
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"})
|
@SuppressWarnings({"unchecked", "RawUseOfParameterizedType"})
|
||||||
@Override
|
@Override
|
||||||
public void handleMessage(Message msg) {
|
public void handleMessage(Message msg) {
|
||||||
|
|||||||
Reference in New Issue
Block a user