Loading src/java/com/android/internal/telephony/InboundSmsHandler.java +9 −0 Original line number Diff line number Diff line Loading @@ -764,6 +764,15 @@ public abstract class InboundSmsHandler extends StateMachine { return Intents.RESULT_SMS_HANDLED; } if (mFeatureFlags.carrierRoamingNbIotNtn()) { SatelliteController satelliteController = SatelliteController.getInstance(); if (satelliteController != null && satelliteController.shouldDropSms(mPhone)) { log("SMS not supported during satellite session."); return Intents.RESULT_SMS_HANDLED; } } int result = dispatchMessageRadioSpecific(smsb, smsSource, token); // In case of error, add to metrics. This is not required in case of success, as the Loading src/java/com/android/internal/telephony/satellite/SatelliteController.java +15 −0 Original line number Diff line number Diff line Loading @@ -8279,6 +8279,21 @@ public class SatelliteController extends Handler { } } /** Returns whether to drop SMS or not. */ public boolean shouldDropSms(@Nullable Phone phone) { final long identity = Binder.clearCallingIdentity(); try { if (!isInCarrierRoamingNbIotNtn(phone)) { return false; } int[] services = getSupportedServicesOnCarrierRoamingNtn(phone.getSubId()); return !ArrayUtils.contains(services, NetworkRegistrationInfo.SERVICE_TYPE_SMS); } finally { Binder.restoreCallingIdentity(identity); } } private boolean isWaitingForSatelliteModemOff() { synchronized (mSatelliteEnabledRequestLock) { return mWaitingForSatelliteModemOff; Loading Loading
src/java/com/android/internal/telephony/InboundSmsHandler.java +9 −0 Original line number Diff line number Diff line Loading @@ -764,6 +764,15 @@ public abstract class InboundSmsHandler extends StateMachine { return Intents.RESULT_SMS_HANDLED; } if (mFeatureFlags.carrierRoamingNbIotNtn()) { SatelliteController satelliteController = SatelliteController.getInstance(); if (satelliteController != null && satelliteController.shouldDropSms(mPhone)) { log("SMS not supported during satellite session."); return Intents.RESULT_SMS_HANDLED; } } int result = dispatchMessageRadioSpecific(smsb, smsSource, token); // In case of error, add to metrics. This is not required in case of success, as the Loading
src/java/com/android/internal/telephony/satellite/SatelliteController.java +15 −0 Original line number Diff line number Diff line Loading @@ -8279,6 +8279,21 @@ public class SatelliteController extends Handler { } } /** Returns whether to drop SMS or not. */ public boolean shouldDropSms(@Nullable Phone phone) { final long identity = Binder.clearCallingIdentity(); try { if (!isInCarrierRoamingNbIotNtn(phone)) { return false; } int[] services = getSupportedServicesOnCarrierRoamingNtn(phone.getSubId()); return !ArrayUtils.contains(services, NetworkRegistrationInfo.SERVICE_TYPE_SMS); } finally { Binder.restoreCallingIdentity(identity); } } private boolean isWaitingForSatelliteModemOff() { synchronized (mSatelliteEnabledRequestLock) { return mWaitingForSatelliteModemOff; Loading