Merge "Settings: Fix force close for telephony callback exceeding limitation" into main

This commit is contained in:
Tom Hsu
2024-03-25 06:49:08 +00:00
committed by Gerrit Code Review

View File

@@ -245,7 +245,11 @@ public class MobileNetworkRepository extends SubscriptionManager.OnSubscriptions
}
private void createTelephonyManagerBySubId(int subId) {
if (subId == SubscriptionManager.INVALID_SUBSCRIPTION_ID) {
if (subId == SubscriptionManager.INVALID_SUBSCRIPTION_ID
|| mTelephonyCallbackMap.containsKey(subId)) {
if (DEBUG) {
Log.d(TAG, "createTelephonyManagerBySubId: directly return for subId = " + subId);
}
return;
}
PhoneCallStateTelephonyCallback