Loading services/core/java/com/android/server/TelephonyRegistry.java +8 −2 Original line number Original line Diff line number Diff line Loading @@ -1027,7 +1027,12 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { log(str); log(str); } } mLocalLog.log(str); mLocalLog.log(str); if (validatePhoneId(phoneId)) { // for service state updates, don't notify clients when subId is invalid. This prevents // us from sending incorrect notifications like b/133140128 // In the future, we can remove this logic for every notification here and add a // callback so listeners know when their PhoneStateListener's subId becomes invalid, but // for now we use the simplest fix. if (validatePhoneId(phoneId) && SubscriptionManager.isValidSubscriptionId(subId)) { mServiceState[phoneId] = state; mServiceState[phoneId] = state; for (Record r : mRecords) { for (Record r : mRecords) { Loading Loading @@ -1059,7 +1064,8 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { } } } } } else { } else { log("notifyServiceStateForSubscriber: INVALID phoneId=" + phoneId); log("notifyServiceStateForSubscriber: INVALID phoneId=" + phoneId + " or subId=" + subId); } } handleRemoveListLocked(); handleRemoveListLocked(); } } Loading Loading
services/core/java/com/android/server/TelephonyRegistry.java +8 −2 Original line number Original line Diff line number Diff line Loading @@ -1027,7 +1027,12 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { log(str); log(str); } } mLocalLog.log(str); mLocalLog.log(str); if (validatePhoneId(phoneId)) { // for service state updates, don't notify clients when subId is invalid. This prevents // us from sending incorrect notifications like b/133140128 // In the future, we can remove this logic for every notification here and add a // callback so listeners know when their PhoneStateListener's subId becomes invalid, but // for now we use the simplest fix. if (validatePhoneId(phoneId) && SubscriptionManager.isValidSubscriptionId(subId)) { mServiceState[phoneId] = state; mServiceState[phoneId] = state; for (Record r : mRecords) { for (Record r : mRecords) { Loading Loading @@ -1059,7 +1064,8 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { } } } } } else { } else { log("notifyServiceStateForSubscriber: INVALID phoneId=" + phoneId); log("notifyServiceStateForSubscriber: INVALID phoneId=" + phoneId + " or subId=" + subId); } } handleRemoveListLocked(); handleRemoveListLocked(); } } Loading