Merge tag 'android-15.0.0_r5' of https://android.googlesource.com/platform/packages/services/Telephony into HEAD

Android 15.0.0 release 5

Change-Id: I66b85f6f04bc1d2c0be65c4f8e3e2e7a8d49cfab

# -----BEGIN PGP SIGNATURE-----
#
# iF0EABECAB0WIQRDQNE1cO+UXoOBCWTorT+BmrEOeAUCZyveoAAKCRDorT+BmrEO
# eGsvAJ9J5Rf153Kp44Npc54gQFpFU2G7bACgkf1IYj0xcoWnYGT5yGrNzHK5Uxc=
# =97lz
# -----END PGP SIGNATURE-----
# gpg: Signature faite le mer 06 nov 2024 16:24:48 EST
# gpg:                avec la clef DSA 4340D13570EF945E83810964E8AD3F819AB10E78
# gpg: Impossible de vérifier la signature : Pas de clef publique
diff --git a/src/com/android/services/telephony/domainselection/NormalCallDomainSelector.java b/src/com/android/services/telephony/domainselection/NormalCallDomainSelector.java
index bf6c647..a8ac047 100644
--- a/src/com/android/services/telephony/domainselection/NormalCallDomainSelector.java
+++ b/src/com/android/services/telephony/domainselection/NormalCallDomainSelector.java
@@ -263,6 +263,12 @@
     }
 
     private void notifyCsSelected() {
+        if (isOutOfService()) {
+            loge("Cannot place call in current ServiceState: " + mServiceState.getState());
+            notifySelectionTerminated(DisconnectCause.OUT_OF_SERVICE);
+            return;
+        }
+
         logd("notifyCsSelected");
         mSelectorState = SelectorState.INACTIVE;
         if (mWwanSelectorCallback == null) {
@@ -317,13 +323,8 @@
             logd("WPS call placed over PS");
             notifyPsSelected();
         } else {
-            if (isOutOfService()) {
-                loge("Cannot place call in current ServiceState: " + mServiceState.getState());
-                notifySelectionTerminated(DisconnectCause.OUT_OF_SERVICE);
-            } else {
-                logd("WPS call placed over CS");
-                notifyCsSelected();
-            }
+            logd("WPS call placed over CS");
+            notifyCsSelected();
         }
     }
 
@@ -367,14 +368,6 @@
         if (mReselectDomain) {
             mReselectDomain = false;
 
-            // Out of service
-            if (isOutOfService()) {
-                loge("Cannot place call in current ServiceState: " + mServiceState.getState());
-                notifySelectionTerminated(DisconnectCause.OUT_OF_SERVICE);
-
-                return;
-            }
-
             // IMS -> CS
             if (imsReasonInfo != null) {
                 logd("PsDisconnectCause:" + imsReasonInfo.getCode());
@@ -412,12 +405,7 @@
 
         if (!mImsStateTracker.isMmTelFeatureAvailable()) {
             logd("MmTelFeatureAvailable unavailable");
-            if (isOutOfService()) {
-                loge("Cannot place call in current ServiceState: " + mServiceState.getState());
-                notifySelectionTerminated(DisconnectCause.OUT_OF_SERVICE);
-            } else {
-                notifyCsSelected();
-            }
+            notifyCsSelected();
             return;
         }
 
@@ -433,23 +421,13 @@
         // Check IMS registration state.
         if (!mImsStateTracker.isImsRegistered()) {
             logd("IMS is NOT registered");
-            if (isOutOfService()) {
-                loge("Cannot place call in current ServiceState: " + mServiceState.getState());
-                notifySelectionTerminated(DisconnectCause.OUT_OF_SERVICE);
-            } else {
-                notifyCsSelected();
-            }
+            notifyCsSelected();
             return;
         }
 
         // Check TTY
         if (isTtyModeEnabled() && !isTtySupportedByIms()) {
-            if (isOutOfService()) {
-                loge("Cannot place call in current ServiceState: " + mServiceState.getState());
-                notifySelectionTerminated(DisconnectCause.OUT_OF_SERVICE);
-            } else {
-                notifyCsSelected();
-            }
+            notifyCsSelected();
             return;
         }
 
@@ -478,12 +456,7 @@
         } else {
             logd("IMS is not voice capable");
             // Voice call CS fallback
-            if (isOutOfService()) {
-                loge("Cannot place call in current ServiceState: " + mServiceState.getState());
-                notifySelectionTerminated(DisconnectCause.OUT_OF_SERVICE);
-            } else {
-                notifyCsSelected();
-            }
+            notifyCsSelected();
         }
     }