Loading src/java/com/android/internal/telephony/satellite/SatelliteController.java +15 −0 Original line number Diff line number Diff line Loading @@ -2929,6 +2929,21 @@ public class SatelliteController extends Handler { return mSatelliteSessionController.setSatelliteListeningTimeoutDuration(timeoutMillis); } /** * This API can be used by only CTS to control ingoring cellular service state event. * * @param enabled Whether to enable boolean config. * @return {@code true} if the value is set successfully, {@code false} otherwise. */ public boolean setSatelliteIgnoreCellularServiceState(boolean enabled) { plogd("setSatelliteIgnoreCellularServiceState - " + enabled); if (mSatelliteSessionController == null) { ploge("setSatelliteIgnoreCellularServiceState is not initialized yet"); return false; } return mSatelliteSessionController.setSatelliteIgnoreCellularServiceState(enabled); } /** * This API can be used by only CTS to override timeout durations used by DatagramController * module. Loading src/java/com/android/internal/telephony/satellite/SatelliteSessionController.java +39 −6 Original line number Diff line number Diff line Loading @@ -164,6 +164,7 @@ public class SatelliteSessionController extends StateMachine { private long mSatelliteStayAtListeningFromSendingMillis; private long mSatelliteStayAtListeningFromReceivingMillis; private long mSatelliteNbIotInactivityTimeoutMillis; private boolean mIgnoreCellularServiceState = false; private final ConcurrentHashMap<IBinder, ISatelliteModemStateCallback> mListeners; @SatelliteManager.SatelliteModemState private int mCurrentState; @SatelliteManager.SatelliteModemState private int mPreviousState; Loading Loading @@ -209,8 +210,10 @@ public class SatelliteSessionController extends StateMachine { boolean isSatelliteSupported) { if (sInstance == null || isSatelliteSupported != sInstance.mIsSatelliteSupported) { ConcurrentHashMap<IBinder, ISatelliteModemStateCallback> existingListeners = null; boolean existIgnoreCellularServiceState = false; if (sInstance != null) { existingListeners = sInstance.mListeners; existIgnoreCellularServiceState = sInstance.mIgnoreCellularServiceState; sInstance.cleanUpResource(); } Loading @@ -224,6 +227,10 @@ public class SatelliteSessionController extends StateMachine { Log.d(TAG, "make() existingListeners: " + existingListeners.size()); sInstance.mListeners.putAll(existingListeners); } if (existIgnoreCellularServiceState) { Log.d(TAG, "make() existIgnoreCellularServiceState is true"); sInstance.mIgnoreCellularServiceState = true; } } return sInstance; } Loading Loading @@ -467,6 +474,23 @@ public class SatelliteSessionController extends StateMachine { return true; } /** * This API can be used by only CTS to control ingoring cellular service state event. * * @param enabled Whether to enable boolean config. * @return {@code true} if the value is set successfully, {@code false} otherwise. */ public boolean setSatelliteIgnoreCellularServiceState(boolean enabled) { plogd("setSatelliteIgnoreCellularServiceState : " + "old = " + mIgnoreCellularServiceState + " new : " + enabled); if (!mFeatureFlags.carrierRoamingNbIotNtn()) { return false; } mIgnoreCellularServiceState = enabled; return true; } /** * This API can be used by only CTS to update satellite gateway service package name. * Loading Loading @@ -867,9 +891,15 @@ public class SatelliteSessionController extends StateMachine { handleSatelliteModemStateChanged(msg); break; case EVENT_ENABLE_CELLULAR_MODEM_WHILE_SATELLITE_MODE_IS_ON_DONE: if (!mIgnoreCellularServiceState) { handleEventEnableCellularModemWhileSatelliteModeIsOnDone(); } else { plogd("IdleState: processing: ignore " + "EVENT_ENABLE_CELLULAR_MODEM_WHILE_SATELLITE_MODE_IS_ON_DONE"); } break; case EVENT_SERVICE_STATE_CHANGED: if (!mIgnoreCellularServiceState) { AsyncResult ar = (msg.obj != null) ? (AsyncResult) msg.obj : null; if (ar == null || ar.result == null) { plogd("IdleState: processing: can't access ServiceState"); Loading @@ -877,6 +907,9 @@ public class SatelliteSessionController extends StateMachine { ServiceState newServiceState = (ServiceState) ar.result; handleEventServiceStateChanged(newServiceState); } } else { plogd("IdleState: processing: ignore EVENT_SERVICE_STATE_CHANGED"); } break; } // Ignore all unexpected events. Loading Loading
src/java/com/android/internal/telephony/satellite/SatelliteController.java +15 −0 Original line number Diff line number Diff line Loading @@ -2929,6 +2929,21 @@ public class SatelliteController extends Handler { return mSatelliteSessionController.setSatelliteListeningTimeoutDuration(timeoutMillis); } /** * This API can be used by only CTS to control ingoring cellular service state event. * * @param enabled Whether to enable boolean config. * @return {@code true} if the value is set successfully, {@code false} otherwise. */ public boolean setSatelliteIgnoreCellularServiceState(boolean enabled) { plogd("setSatelliteIgnoreCellularServiceState - " + enabled); if (mSatelliteSessionController == null) { ploge("setSatelliteIgnoreCellularServiceState is not initialized yet"); return false; } return mSatelliteSessionController.setSatelliteIgnoreCellularServiceState(enabled); } /** * This API can be used by only CTS to override timeout durations used by DatagramController * module. Loading
src/java/com/android/internal/telephony/satellite/SatelliteSessionController.java +39 −6 Original line number Diff line number Diff line Loading @@ -164,6 +164,7 @@ public class SatelliteSessionController extends StateMachine { private long mSatelliteStayAtListeningFromSendingMillis; private long mSatelliteStayAtListeningFromReceivingMillis; private long mSatelliteNbIotInactivityTimeoutMillis; private boolean mIgnoreCellularServiceState = false; private final ConcurrentHashMap<IBinder, ISatelliteModemStateCallback> mListeners; @SatelliteManager.SatelliteModemState private int mCurrentState; @SatelliteManager.SatelliteModemState private int mPreviousState; Loading Loading @@ -209,8 +210,10 @@ public class SatelliteSessionController extends StateMachine { boolean isSatelliteSupported) { if (sInstance == null || isSatelliteSupported != sInstance.mIsSatelliteSupported) { ConcurrentHashMap<IBinder, ISatelliteModemStateCallback> existingListeners = null; boolean existIgnoreCellularServiceState = false; if (sInstance != null) { existingListeners = sInstance.mListeners; existIgnoreCellularServiceState = sInstance.mIgnoreCellularServiceState; sInstance.cleanUpResource(); } Loading @@ -224,6 +227,10 @@ public class SatelliteSessionController extends StateMachine { Log.d(TAG, "make() existingListeners: " + existingListeners.size()); sInstance.mListeners.putAll(existingListeners); } if (existIgnoreCellularServiceState) { Log.d(TAG, "make() existIgnoreCellularServiceState is true"); sInstance.mIgnoreCellularServiceState = true; } } return sInstance; } Loading Loading @@ -467,6 +474,23 @@ public class SatelliteSessionController extends StateMachine { return true; } /** * This API can be used by only CTS to control ingoring cellular service state event. * * @param enabled Whether to enable boolean config. * @return {@code true} if the value is set successfully, {@code false} otherwise. */ public boolean setSatelliteIgnoreCellularServiceState(boolean enabled) { plogd("setSatelliteIgnoreCellularServiceState : " + "old = " + mIgnoreCellularServiceState + " new : " + enabled); if (!mFeatureFlags.carrierRoamingNbIotNtn()) { return false; } mIgnoreCellularServiceState = enabled; return true; } /** * This API can be used by only CTS to update satellite gateway service package name. * Loading Loading @@ -867,9 +891,15 @@ public class SatelliteSessionController extends StateMachine { handleSatelliteModemStateChanged(msg); break; case EVENT_ENABLE_CELLULAR_MODEM_WHILE_SATELLITE_MODE_IS_ON_DONE: if (!mIgnoreCellularServiceState) { handleEventEnableCellularModemWhileSatelliteModeIsOnDone(); } else { plogd("IdleState: processing: ignore " + "EVENT_ENABLE_CELLULAR_MODEM_WHILE_SATELLITE_MODE_IS_ON_DONE"); } break; case EVENT_SERVICE_STATE_CHANGED: if (!mIgnoreCellularServiceState) { AsyncResult ar = (msg.obj != null) ? (AsyncResult) msg.obj : null; if (ar == null || ar.result == null) { plogd("IdleState: processing: can't access ServiceState"); Loading @@ -877,6 +907,9 @@ public class SatelliteSessionController extends StateMachine { ServiceState newServiceState = (ServiceState) ar.result; handleEventServiceStateChanged(newServiceState); } } else { plogd("IdleState: processing: ignore EVENT_SERVICE_STATE_CHANGED"); } break; } // Ignore all unexpected events. Loading