Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit aac095e9 authored by Adrian Mejia's avatar Adrian Mejia Committed by Android (Google) Code Review
Browse files

Merge "Do not enable modem scan in satellite mode if device does not want to...

Merge "Do not enable modem scan in satellite mode if device does not want to enable TN scanning in satellite session" into main
parents ac4622f2 0cf10614
Loading
Loading
Loading
Loading
+12 −3
Original line number Diff line number Diff line
@@ -874,10 +874,19 @@ public class SatelliteSessionController extends StateMachine {
            stopNbIotInactivityTimer();

            //Enable Cellular Modem scanning
            boolean configSatelliteAllowTnScanningDuringSatelliteSession =
                    mContext.getResources().getBoolean(
                        R.bool.config_satellite_allow_tn_scanning_during_satellite_session);
            if (configSatelliteAllowTnScanningDuringSatelliteSession) {
                Message onCompleted =
                    obtainMessage(EVENT_ENABLE_CELLULAR_MODEM_WHILE_SATELLITE_MODE_IS_ON_DONE);
            mSatelliteModemInterface.enableCellularModemWhileSatelliteModeIsOn(true, onCompleted);
            if (isConcurrentTnScanningSupported()) {
                mSatelliteModemInterface
                    .enableCellularModemWhileSatelliteModeIsOn(true, onCompleted);
            } else {
                plogd("Device does not allow cellular modem scanning");
            }
            if (isConcurrentTnScanningSupported()
                    || !configSatelliteAllowTnScanningDuringSatelliteSession) {
                plogd("IDLE state is hidden from clients");
            } else {
                notifyStateChangedEvent(SatelliteManager.SATELLITE_MODEM_STATE_IDLE);
+3 −1
Original line number Diff line number Diff line
@@ -150,7 +150,9 @@ public class SatelliteSessionControllerTest extends TelephonyTest {
        when(resources.getBoolean(
                 R.bool.config_satellite_modem_support_concurrent_tn_scanning))
            .thenReturn(false);

        when(resources.getBoolean(
                 R.bool.config_satellite_allow_tn_scanning_during_satellite_session))
            .thenReturn(true);
        when(mFeatureFlags.satellitePersistentLogging()).thenReturn(true);
        when(mMockSatelliteController.isSatelliteAttachRequired()).thenReturn(false);
        when(mMockSatelliteController.isSatelliteRoamingP2pSmSSupported(