Merge "Fix issue of triggering SOS handover for T911 calls" into main
diff --git a/src/java/com/android/internal/telephony/satellite/SatelliteSOSMessageRecommender.java b/src/java/com/android/internal/telephony/satellite/SatelliteSOSMessageRecommender.java
index 377542d..e924878 100644
--- a/src/java/com/android/internal/telephony/satellite/SatelliteSOSMessageRecommender.java
+++ b/src/java/com/android/internal/telephony/satellite/SatelliteSOSMessageRecommender.java
@@ -673,7 +673,7 @@
@NonNull private Bundle createExtraBundleForEventDisplayEmergencyMessage(
boolean isTestEmergencyNumber) {
- int handoverType = EMERGENCY_CALL_TO_SATELLITE_HANDOVER_TYPE_SOS;
+ int handoverType = getEmergencyCallToSatelliteHandoverType();
Pair<String, String> oemSatelliteMessagingApp =
getOemEnabledSatelliteHandoverAppFromOverlayConfig(mContext);
String packageName = oemSatelliteMessagingApp.first;
@@ -681,10 +681,8 @@
String action = getSatelliteEmergencyHandoverIntentActionFromOverlayConfig(mContext,
isTestEmergencyNumber);
- if (isSatelliteConnectedViaCarrierWithinHysteresisTime()
- || isEmergencyCallToSatelliteHandoverTypeT911Enforced()) {
+ if (handoverType == EMERGENCY_CALL_TO_SATELLITE_HANDOVER_TYPE_T911) {
ComponentName defaultSmsAppComponent = getDefaultSmsApp();
- handoverType = EMERGENCY_CALL_TO_SATELLITE_HANDOVER_TYPE_T911;
packageName = defaultSmsAppComponent.getPackageName();
className = defaultSmsAppComponent.getClassName();
}