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

Skip to content
Commit 88e15dd0 authored by Jordan Demeulenaere's avatar Jordan Demeulenaere
Browse files

Remove calls to invokeOnCompletion

This CL removes all calls to invokeOnCompletion in STL codebase. As
mentioned in the KDoc, there is no guarantee on which thread the
invokeOnCompletion block is run, which can cause concurrency issues that
throw an exception since ag/27342795.

The calls to invokeOnCompletion were replaced by a try/finally block.
However, it is important to note that a try block launched inside a
coroutine might never run if the coroutine is cancelled before it
starts. For this reason, we must also specify `start = ATOMIC` when
launching the coroutine to make sure that the try/finally block will
definitely run until the first suspension point.

Bug: 290930950
Bug: 340824084
Test: atest PlatformComposeSceneTransitionLayoutTests
Flag: com.android.systemui.scene_container
Change-Id: Ia822d4a2e0f424cd7a6715fb7dbeaf46affcaba3
parent b93b830a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment