Ignore stale scan result if scan timer has been expired.
Though scanning had been canceled, the scan result was reported
and it caused abnormal behavior. This should be ignored.
Bug: 266191727
Test: manual
Change-Id: I043da08b4c177f2c8d0e2a51032087ae98b01cf6
diff --git a/src/com/android/services/telephony/domainselection/EmergencyCallDomainSelector.java b/src/com/android/services/telephony/domainselection/EmergencyCallDomainSelector.java
index d1eda18..51becde 100644
--- a/src/com/android/services/telephony/domainselection/EmergencyCallDomainSelector.java
+++ b/src/com/android/services/telephony/domainselection/EmergencyCallDomainSelector.java
@@ -242,6 +242,11 @@
private void handleScanResult(EmergencyRegResult result) {
logi("handleScanResult result=" + result);
+ if (mLastTransportType == TRANSPORT_TYPE_WLAN) {
+ logi("handleScanResult timer expired, WLAN has been selected, ignore stale result");
+ return;
+ }
+
// Detected the country and found that emergency calls are not allowed with this slot.
if (!allowEmergencyCalls(result)) {
terminateSelectionPermanentlyForSlot();