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
1 file changed