Skip to content
Commit 059a1552 authored by Jia Zekun's avatar Jia Zekun Committed by Jordibgzashtita
Browse files

OverlayManagerService: add a new thread to handle user receiver



We discovered a systemserver main thread blocking problem during the STS test.
This problem caused a delay of 3 seconds in the systemserver main thread, which
caused a delay of 3 seconds in sending the notify message of the change of
hidden_api_policy field in SettingsProvider. As a result, the field does not take
effect during testing and the test fails.

Analyzing the code, we found that the code we added in the OverlayManagerService
to dynamically change the theme using the RRO mechanism held mLock in advance,
causing the ACTION_USER_ADDED message to wait for the lock in the systemserver
main thread.

Although we have added a lot of code that uses RRO, we still believe that the
Handler of the receiver where ACTION_USER_ADDED is located needs to be placed in
a new thread like the receiver of ACTION_PACKAGE_ADDED to avoid blocking the
main thread.

Related Testcase:

CtsSecurityBulletinHostTestCases
android.security.cts.CVE_2023_21244#testPocCVE_2023_21244

Change-Id: Iea1e522c210140728832c6ecef1bcc2888bd5ddb
Signed-off-by: default avatarJia Jia <jia.jia@zte.com.cn>
Signed-off-by: default avatarPranav Vashi <neobuddy89@gmail.com>
parent add7ca58
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment