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

Commit 71bc1642 authored by Jordan Liu's avatar Jordan Liu Committed by android-build-merger
Browse files

Merge "Do not notify SS change with invalid subId" into qt-r1-dev

am: edee6e6c

Change-Id: I18e806fe8f9ff712ca9e236f0cee5f6e914ddde5
parents ecb9bf2f edee6e6c
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -1027,7 +1027,12 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub {
                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;

                for (Record r : mRecords) {
@@ -1059,7 +1064,8 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub {
                    }
                }
            } else {
                log("notifyServiceStateForSubscriber: INVALID phoneId=" + phoneId);
                log("notifyServiceStateForSubscriber: INVALID phoneId=" + phoneId
                        + " or subId=" + subId);
            }
            handleRemoveListLocked();
        }