diff options
author | hoffc <quic_hoffc@quicinc.com> | 2024-03-08 17:31:04 +0800 |
---|---|---|
committer | hoffc <quic_hoffc@quicinc.com> | 2024-03-21 17:32:13 +0800 |
commit | ef2e171b50accf39ab5fd8647c4aea4413e456ed (patch) | |
tree | bb44529e081d99ec4898028c7b489dd53d8410aa | |
parent | 2e090585ca6e668ed9f482f57d0188a3e403b6d2 (diff) | |
download | Settings-ef2e171b50accf39ab5fd8647c4aea4413e456ed.tar.gz |
Settings: Fix force close for telephony callback exceeding limitation
When sub info changed, new telephony callback will be registered but old telephony callback not un-registered. Finally result in force close for registered telephony callback count exceeding its allowed.
No need to re-registered the telephony callback for one sub if registered.
Bug: 328716180
Change-Id: Ia0c3b311b5b5cc77f061d81ec21250abde2fa9f4
-rw-r--r-- | src/com/android/settings/network/MobileNetworkRepository.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/com/android/settings/network/MobileNetworkRepository.java b/src/com/android/settings/network/MobileNetworkRepository.java index af37d249c4c..7bc61a49438 100644 --- a/src/com/android/settings/network/MobileNetworkRepository.java +++ b/src/com/android/settings/network/MobileNetworkRepository.java @@ -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 |