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

Commit 0cf10614 authored by Adrian Mejia's avatar Adrian Mejia
Browse files

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

Do not enable modem scan in satellite mode if device does not want to enable TN scanning in satellite session

Change-Id: I0c895d8cc9db21a2091554086a2b88d1d1018eb6
BUG: 382143173
Test: atest SatelliteSessionControllerTest
Flag: EXEMPT bugfix through config
parent c39974b3
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(