+5
−1
Loading
Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more
TransactionHandle introduces a reliable mechanism for cleaning up resources even if the corresponding Transaction has been parceled and/or sent to another process. Transaction callbacks are removed from TransactionCompletedListener when the last reference to a TransactionHandle is dropped. If the transaction is applied, the TransactionHandles registered for its callbacks are passed to SurfaceFlinger and then back to the client process, keeping them alive until after the callbacks are called. If the transaction is dropped without getting applied, uncalled callbacks and corresponding SurfaceControl references are removed from TransactionCompletedListener. Bug: 261757446 Flag: com.android.graphics.libgui.flags.unapplied_transaction_cleanup Test: atest libgui_test --test-filter='TransactionCallbackTest*' Change-Id: I5099ec819e31f4b83e7069ff3fb117d8d9708d1e