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

Skip to content
Commit 8047e4e2 authored by Sebastian Achim's avatar Sebastian Achim Committed by Steve Statia
Browse files

Move getActiveSubscriptionInfo to solve deadlock

Solve deadlock between system_server and com.android.phone.

A system_server thread hold a TelephonyRegistry mRecords object
while doing a binder transaction with com.android.phone for
getActiveSubscriptionInfo().

When all binder threads in com.android.phone are busy it will take
time until this is scheduled. There are cases when com.android.phone
is doing a binder transaction with system_server to acquire the same
mRecords object, resulting in deadlock.

Align with other getPhoneIdFromSubId() calls and move the call to
SubscriptionManager getActiveSubscriptionInfo outside of synchronized
block to prevent this from happening.

Test: atest TelephonyRegistryTest
Bug: 315932019
Change-Id: Ifadf9d33ef2072352b0bd1a805da9a5f0329114e
parent 0553b14a
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