Check if satellite is in emergency mode when doing geofencing

Bug: 347111120
Test: manual system tests

Change-Id: I9062ec0263cbad01089b0fb8a9d4fb806d1bb88a
diff --git a/src/com/android/phone/satellite/accesscontrol/SatelliteAccessController.java b/src/com/android/phone/satellite/accesscontrol/SatelliteAccessController.java
index b6003a8..25f00dd 100644
--- a/src/com/android/phone/satellite/accesscontrol/SatelliteAccessController.java
+++ b/src/com/android/phone/satellite/accesscontrol/SatelliteAccessController.java
@@ -1052,6 +1052,8 @@
             mAccessControllerMetricsStats.setLocationQueryTime(mLocationQueryStartTimeMillis);
             Bundle bundle = new Bundle();
             if (location != null) {
+                plogd("onCurrentLocationAvailable: lat=" + Rlog.pii(TAG, location.getLatitude())
+                        + ", long=" + Rlog.pii(TAG, location.getLongitude()));
                 if (location.isMock() && !isMockModemAllowed()) {
                     logd("location is mock");
                     bundle.putBoolean(KEY_SATELLITE_COMMUNICATION_ALLOWED, false);
@@ -1214,14 +1216,23 @@
     private boolean isInEmergency() {
         // Check if emergency call is ongoing
         if (mTelecomManager.isInEmergencyCall()) {
+            plogd("In emergency call");
             return true;
         }
+
         // Check if the device is in emergency callback mode
         for (Phone phone : PhoneFactory.getPhones()) {
             if (phone.isInEcm()) {
+                plogd("In emergency callback mode");
                 return true;
             }
         }
+
+        // Check if satellite is in emergency mode
+        if (mSatelliteController.isInEmergencyMode()) {
+            plogd("In satellite emergency mode");
+            return true;
+        }
         return false;
     }