Loading services/core/java/com/android/server/TelephonyRegistry.java +33 −27 Original line number Diff line number Diff line Loading @@ -1732,9 +1732,11 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { // 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; if (SubscriptionManager.isValidSubscriptionId(subId)) { for (Record r : mRecords) { if (VDBG) { log("notifyServiceStateForSubscriber: r=" + r + " subId=" + subId Loading @@ -1748,7 +1750,8 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { ServiceState stateToSend; if (checkFineLocationAccess(r, Build.VERSION_CODES.Q)) { stateToSend = new ServiceState(state); } else if (checkCoarseLocationAccess(r, Build.VERSION_CODES.Q)) { } else if(checkCoarseLocationAccess( r, Build.VERSION_CODES.Q)) { stateToSend = state.createLocationInfoSanitizedCopy(false); } else { stateToSend = state.createLocationInfoSanitizedCopy(true); Loading @@ -1764,9 +1767,12 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { } } } } else { log("notifyServiceStateForSubscriber: INVALID subId=" +subId); } } else { log("notifyServiceStateForSubscriber: INVALID phoneId=" + phoneId + " or subId=" + subId); log("notifyServiceStateForSubscriber: INVALID phoneId=" + phoneId); } handleRemoveListLocked(); } Loading Loading
services/core/java/com/android/server/TelephonyRegistry.java +33 −27 Original line number Diff line number Diff line Loading @@ -1732,9 +1732,11 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { // 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; if (SubscriptionManager.isValidSubscriptionId(subId)) { for (Record r : mRecords) { if (VDBG) { log("notifyServiceStateForSubscriber: r=" + r + " subId=" + subId Loading @@ -1748,7 +1750,8 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { ServiceState stateToSend; if (checkFineLocationAccess(r, Build.VERSION_CODES.Q)) { stateToSend = new ServiceState(state); } else if (checkCoarseLocationAccess(r, Build.VERSION_CODES.Q)) { } else if(checkCoarseLocationAccess( r, Build.VERSION_CODES.Q)) { stateToSend = state.createLocationInfoSanitizedCopy(false); } else { stateToSend = state.createLocationInfoSanitizedCopy(true); Loading @@ -1764,9 +1767,12 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { } } } } else { log("notifyServiceStateForSubscriber: INVALID subId=" +subId); } } else { log("notifyServiceStateForSubscriber: INVALID phoneId=" + phoneId + " or subId=" + subId); log("notifyServiceStateForSubscriber: INVALID phoneId=" + phoneId); } handleRemoveListLocked(); } Loading