Loading src/java/com/android/internal/telephony/satellite/SatelliteController.java +5 −0 Original line number Diff line number Diff line Loading @@ -6612,6 +6612,11 @@ public class SatelliteController extends Handler { } int subId = phone.getSubId(); if (!isSatelliteRoamingP2pSmSSupported(subId)) { plogd("isCarrierRoamingNtnEligible: doesn't support P2P SMS"); return false; } if (!isSatelliteSupportedViaCarrier(subId)) { plogd("isCarrierRoamingNtnEligible[phoneId=" + phone.getPhoneId() + "]: satellite is not supported via carrier"); Loading src/java/com/android/internal/telephony/satellite/SatelliteSessionController.java +6 −1 Original line number Diff line number Diff line Loading @@ -1558,8 +1558,13 @@ public class SatelliteSessionController extends StateMachine { return; } if (!mSatelliteController.isInCarrierRoamingNbIotNtn()) { logd("registerScreenOnOffChanged: device is not in CarrierRoamingNbIotNtn"); return; } if (mSatelliteController.getRequestIsEmergency()) { if (DBG) logd("registerScreenOnOffChanged: Emergency mode"); logd("registerScreenOnOffChanged: not register, device is in Emergency mode"); // screen on/off timer is available in not emergency mode return; } Loading tests/telephonytests/src/com/android/internal/telephony/satellite/SatelliteControllerTest.java +3 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import static android.telephony.CarrierConfigManager.KEY_SATELLITE_ATTACH_SUPPOR import static android.telephony.CarrierConfigManager.KEY_SATELLITE_CONNECTION_HYSTERESIS_SEC_INT; import static android.telephony.CarrierConfigManager.KEY_SATELLITE_ESOS_SUPPORTED_BOOL; import static android.telephony.CarrierConfigManager.KEY_SATELLITE_NIDD_APN_NAME_STRING; import static android.telephony.CarrierConfigManager.KEY_SATELLITE_ROAMING_P2P_SMS_SUPPORTED_BOOL; import static android.telephony.CarrierConfigManager.KEY_SATELLITE_ROAMING_TURN_OFF_SESSION_FOR_EMERGENCY_CALL_BOOL; import static android.telephony.NetworkRegistrationInfo.SERVICE_TYPE_DATA; import static android.telephony.SubscriptionManager.SATELLITE_ENTITLEMENT_STATUS; Loading Loading @@ -4019,6 +4020,7 @@ public class SatelliteControllerTest extends TelephonyTest { when(mServiceState2.getState()).thenReturn(ServiceState.STATE_OUT_OF_SERVICE); mCarrierConfigBundle.putBoolean(KEY_SATELLITE_ATTACH_SUPPORTED_BOOL, true); mCarrierConfigBundle.putInt(KEY_CARRIER_ROAMING_NTN_CONNECT_TYPE_INT, 1); mCarrierConfigBundle.putBoolean(KEY_SATELLITE_ROAMING_P2P_SMS_SUPPORTED_BOOL, true); int[] supportedServices2 = {2}; int[] supportedServices3 = {1, 3}; PersistableBundle carrierSupportedSatelliteServicesPerProvider = new PersistableBundle(); Loading Loading @@ -4078,6 +4080,7 @@ public class SatelliteControllerTest extends TelephonyTest { mCarrierConfigBundle.putInt(KEY_CARRIER_ROAMING_NTN_CONNECT_TYPE_INT, 1); mCarrierConfigBundle.putInt( KEY_CARRIER_SUPPORTED_SATELLITE_NOTIFICATION_HYSTERESIS_SEC_INT, 1 * 60); mCarrierConfigBundle.putBoolean(KEY_SATELLITE_ROAMING_P2P_SMS_SUPPORTED_BOOL, true); int[] supportedServices2 = {2}; int[] supportedServices3 = {1, 3}; PersistableBundle carrierSupportedSatelliteServicesPerProvider = new PersistableBundle(); Loading tests/telephonytests/src/com/android/internal/telephony/satellite/SatelliteSessionControllerTest.java +2 −0 Original line number Diff line number Diff line Loading @@ -216,6 +216,7 @@ public class SatelliteSessionControllerTest extends TelephonyTest { bundle.putInt(KEY_SATELLITE_ROAMING_SCREEN_OFF_INACTIVITY_TIMEOUT_SEC_INT, SCREEN_OFF_INACTIVITY_TIMEOUT_SEC); when(mMockSatelliteController.getPersistableBundle(anyInt())).thenReturn(bundle); when(mMockSatelliteController.isInCarrierRoamingNbIotNtn()).thenReturn(true); // Since satellite is supported, SatelliteSessionController should move to POWER_OFF state. assertNotNull(mTestSatelliteSessionController); Loading Loading @@ -255,6 +256,7 @@ public class SatelliteSessionControllerTest extends TelephonyTest { bundle.putInt(KEY_SATELLITE_ROAMING_SCREEN_OFF_INACTIVITY_TIMEOUT_SEC_INT, SCREEN_OFF_INACTIVITY_TIMEOUT_SEC); when(mMockSatelliteController.getPersistableBundle(anyInt())).thenReturn(bundle); when(mMockSatelliteController.isInCarrierRoamingNbIotNtn()).thenReturn(true); // Since satellite is supported, SatelliteSessionController should move to POWER_OFF state. assertNotNull(mTestSatelliteSessionController); Loading Loading
src/java/com/android/internal/telephony/satellite/SatelliteController.java +5 −0 Original line number Diff line number Diff line Loading @@ -6612,6 +6612,11 @@ public class SatelliteController extends Handler { } int subId = phone.getSubId(); if (!isSatelliteRoamingP2pSmSSupported(subId)) { plogd("isCarrierRoamingNtnEligible: doesn't support P2P SMS"); return false; } if (!isSatelliteSupportedViaCarrier(subId)) { plogd("isCarrierRoamingNtnEligible[phoneId=" + phone.getPhoneId() + "]: satellite is not supported via carrier"); Loading
src/java/com/android/internal/telephony/satellite/SatelliteSessionController.java +6 −1 Original line number Diff line number Diff line Loading @@ -1558,8 +1558,13 @@ public class SatelliteSessionController extends StateMachine { return; } if (!mSatelliteController.isInCarrierRoamingNbIotNtn()) { logd("registerScreenOnOffChanged: device is not in CarrierRoamingNbIotNtn"); return; } if (mSatelliteController.getRequestIsEmergency()) { if (DBG) logd("registerScreenOnOffChanged: Emergency mode"); logd("registerScreenOnOffChanged: not register, device is in Emergency mode"); // screen on/off timer is available in not emergency mode return; } Loading
tests/telephonytests/src/com/android/internal/telephony/satellite/SatelliteControllerTest.java +3 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import static android.telephony.CarrierConfigManager.KEY_SATELLITE_ATTACH_SUPPOR import static android.telephony.CarrierConfigManager.KEY_SATELLITE_CONNECTION_HYSTERESIS_SEC_INT; import static android.telephony.CarrierConfigManager.KEY_SATELLITE_ESOS_SUPPORTED_BOOL; import static android.telephony.CarrierConfigManager.KEY_SATELLITE_NIDD_APN_NAME_STRING; import static android.telephony.CarrierConfigManager.KEY_SATELLITE_ROAMING_P2P_SMS_SUPPORTED_BOOL; import static android.telephony.CarrierConfigManager.KEY_SATELLITE_ROAMING_TURN_OFF_SESSION_FOR_EMERGENCY_CALL_BOOL; import static android.telephony.NetworkRegistrationInfo.SERVICE_TYPE_DATA; import static android.telephony.SubscriptionManager.SATELLITE_ENTITLEMENT_STATUS; Loading Loading @@ -4019,6 +4020,7 @@ public class SatelliteControllerTest extends TelephonyTest { when(mServiceState2.getState()).thenReturn(ServiceState.STATE_OUT_OF_SERVICE); mCarrierConfigBundle.putBoolean(KEY_SATELLITE_ATTACH_SUPPORTED_BOOL, true); mCarrierConfigBundle.putInt(KEY_CARRIER_ROAMING_NTN_CONNECT_TYPE_INT, 1); mCarrierConfigBundle.putBoolean(KEY_SATELLITE_ROAMING_P2P_SMS_SUPPORTED_BOOL, true); int[] supportedServices2 = {2}; int[] supportedServices3 = {1, 3}; PersistableBundle carrierSupportedSatelliteServicesPerProvider = new PersistableBundle(); Loading Loading @@ -4078,6 +4080,7 @@ public class SatelliteControllerTest extends TelephonyTest { mCarrierConfigBundle.putInt(KEY_CARRIER_ROAMING_NTN_CONNECT_TYPE_INT, 1); mCarrierConfigBundle.putInt( KEY_CARRIER_SUPPORTED_SATELLITE_NOTIFICATION_HYSTERESIS_SEC_INT, 1 * 60); mCarrierConfigBundle.putBoolean(KEY_SATELLITE_ROAMING_P2P_SMS_SUPPORTED_BOOL, true); int[] supportedServices2 = {2}; int[] supportedServices3 = {1, 3}; PersistableBundle carrierSupportedSatelliteServicesPerProvider = new PersistableBundle(); Loading
tests/telephonytests/src/com/android/internal/telephony/satellite/SatelliteSessionControllerTest.java +2 −0 Original line number Diff line number Diff line Loading @@ -216,6 +216,7 @@ public class SatelliteSessionControllerTest extends TelephonyTest { bundle.putInt(KEY_SATELLITE_ROAMING_SCREEN_OFF_INACTIVITY_TIMEOUT_SEC_INT, SCREEN_OFF_INACTIVITY_TIMEOUT_SEC); when(mMockSatelliteController.getPersistableBundle(anyInt())).thenReturn(bundle); when(mMockSatelliteController.isInCarrierRoamingNbIotNtn()).thenReturn(true); // Since satellite is supported, SatelliteSessionController should move to POWER_OFF state. assertNotNull(mTestSatelliteSessionController); Loading Loading @@ -255,6 +256,7 @@ public class SatelliteSessionControllerTest extends TelephonyTest { bundle.putInt(KEY_SATELLITE_ROAMING_SCREEN_OFF_INACTIVITY_TIMEOUT_SEC_INT, SCREEN_OFF_INACTIVITY_TIMEOUT_SEC); when(mMockSatelliteController.getPersistableBundle(anyInt())).thenReturn(bundle); when(mMockSatelliteController.isInCarrierRoamingNbIotNtn()).thenReturn(true); // Since satellite is supported, SatelliteSessionController should move to POWER_OFF state. assertNotNull(mTestSatelliteSessionController); Loading