Skip to content
This repository has been archived by the owner on Feb 25, 2025. It is now read-only.

Commit

Permalink
[Android] post image task to main handler.
Browse files Browse the repository at this point in the history
  • Loading branch information
jonahwilliams committed Apr 10, 2024
1 parent 11f2cb3 commit 0b06d42
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
import java.util.List;
import java.util.Set;
import java.util.concurrent.atomic.AtomicLong;
import android.os.Looper;

/**
* Represents the rendering responsibilities of a {@code FlutterEngine}.
Expand Down Expand Up @@ -484,7 +485,7 @@ private class PerImageReader {

public PerImageReader(ImageReader reader) {
this.reader = reader;
reader.setOnImageAvailableListener(onImageAvailableListener, new Handler());
reader.setOnImageAvailableListener(onImageAvailableListener, new Handler(Looper.getMainLooper()));
}

PerImage queueImage(Image image) {
Expand Down

0 comments on commit 0b06d42

Please sign in to comment.