OSDN Git Service

Revert "Do not notify SS change with invalid subId"
authorAmit Mahajan <amitmahajan@google.com>
Sat, 27 Jul 2019 00:15:03 +0000 (00:15 +0000)
committerAmit Mahajan <amitmahajan@google.com>
Sat, 27 Jul 2019 00:15:03 +0000 (00:15 +0000)
This reverts commit 6db77174a2171157bfc93c5836704fd6609c9ae7.

Reason for revert: b/138357571 (no signal bars even when device is in service)

Change-Id: I98eb708ef4f624bfba541d409837846662255d72

services/core/java/com/android/server/TelephonyRegistry.java

index f7e825e..e66e596 100644 (file)
@@ -1027,12 +1027,7 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub {
                 log(str);
             }
             mLocalLog.log(str);
-            // 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)) {
+            if (validatePhoneId(phoneId)) {
                 mServiceState[phoneId] = state;
 
                 for (Record r : mRecords) {
@@ -1064,8 +1059,7 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub {
                     }
                 }
             } else {
-                log("notifyServiceStateForSubscriber: INVALID phoneId=" + phoneId
-                        + " or subId=" + subId);
+                log("notifyServiceStateForSubscriber: INVALID phoneId=" + phoneId);
             }
             handleRemoveListLocked();
         }