Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b77106a6 authored by Kean Mariotti's avatar Kean Mariotti
Browse files

viewcapture: remove runOnUiThread() call

Execute registerComponentCallbacks() immediately
(instead of posting on the View), to avoid issues
in case the SafeCloseable (stop capture) is executed
before registerComponentCallbacks().

Bug: 400793700
Flag: EXEMPT minor change
Test: presubmit
Change-Id: I2dce41fd1294d2731269e8dc66b4083f082aebd1
parent 868534d2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -136,7 +136,7 @@ public abstract class ViewCapture {

        mListeners.add(listener);

        runOnUiThread(() -> view.getContext().registerComponentCallbacks(listener), view);
        view.getContext().registerComponentCallbacks(listener);

        return () -> {
            if (listener.mRoot != null && listener.mRoot.getContext() != null) {