summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Jordan Liu <jminjie@google.com> 2019-07-11 19:06:34 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2019-07-11 19:06:34 +0000
commitedee6e6c2a4d75f7ec65ab882f77547f0181da65 (patch)
tree1cea7458ae6ab5ab30b7f65b88dd4843e5d72d3a
parent2b4e2b911084c99eee11b62d0c521c33f4a0558a (diff)
parent6db77174a2171157bfc93c5836704fd6609c9ae7 (diff)
Merge "Do not notify SS change with invalid subId" into qt-r1-dev
-rw-r--r--services/core/java/com/android/server/TelephonyRegistry.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/services/core/java/com/android/server/TelephonyRegistry.java b/services/core/java/com/android/server/TelephonyRegistry.java
index e66e596d5038..f7e825eecc12 100644
--- a/services/core/java/com/android/server/TelephonyRegistry.java
+++ b/services/core/java/com/android/server/TelephonyRegistry.java
@@ -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();
}