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

Commit 584f5307 authored by Winson Chung's avatar Winson Chung
Browse files

Ensure we register the input consumer on the ui thread.

- We register the input consumer on the interim choreographer thread
  but unregister the input consumer on the UI thread when invalidating
  the previous handler. This may have caused a race condition where
  the disposal of the input consumer overlapped with the registration
  of the new one (they share a key in the input consumer map in the
  system)

Bug: 73505150
Test: Unable to reproduce, this is a hypothetical fix
Change-Id: I20a9a7be967f5072bbf50ce12e5e61cb939e3c75
parent 70fb53c2
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -235,7 +235,9 @@ public class WindowTransformSwipeHandler extends BaseSwipeInteractionHandler {
        mContext = context;
        mRunningTaskId = runningTaskInfo.id;
        mTouchTimeMs = touchTimeMs;
        mInputConsumer.registerInputConsumer();
        // Register the input consumer on the UI thread, to ensure that it runs after any pending
        // unregister calls
        mMainExecutor.execute(mInputConsumer::registerInputConsumer);
        initStateCallbacks();
    }