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

Skip to content
Commit 1739413a authored by Lee Shombert's avatar Lee Shombert
Browse files

Finalize BulkCursorNative asynchronously

BulkNativeCursor should be closed explicitly but when it is not, it is
closed by the finalizer.  If the remote process is busy, this can
trigger a TimeoutException from the FinalizerWatchdogDaemon.  The
solution is to make the remote call asynchronous, if the current
thread is the finalizer.

This is a best-effort mitigation, for clients that fail to explicitly
close BulkNativeCursor instances.

Tested with an instrumented build that leaked a BulkNativeCursor and
waited for the finalizer to clean up the instance.  Verified that the
remote call was one-way.

Flag: android.database.sqlite.oneway_finalizer_close
Bug: 368221351
Test: atest
 * FrameworksCoreTests:android.database
 * CtsDatabaseTestCases
Change-Id: I39b1a4b4465b4b9d66c73c80db0455b1352c7862
parent dbea722f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment