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

Commit 538e5354 authored by Kai Li's avatar Kai Li
Browse files

Post creating the `android.bg` thread during app start up time for CCAPI use cases.

- `MainContentCaptureSession.start` is called from `Activity#onPostCreate`. For performance reasons, only create a task in `onPostCreate` and really perform the start when finishing rendering the first frame in `ViewRootImpl`.
- The content capture thread `android.bg` is now created and initialized in the binder thread, instead of the UI thread.
- Only the app in the CCAPI allowlist will create this `android.bg` thread.

Collected trace file: https://ui.perfetto.dev/#!/?s=fc6d9f4a502ab65e68633a9b0b70a220e0d42f6c

Bug: 376468525
Change-Id: I0575a309b5e36e043103ceff71aa93c51a75b4c8
Test: atest CtsContentCaptureServiceTestCases
Flag: android.view.contentcapture.flags.post_create_android_bg_thread
parent a6e8e010
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