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

Commit d9bc9f0e authored by Aishwarya Mallampati's avatar Aishwarya Mallampati Committed by Android (Google) Code Review
Browse files

Merge "Revert^2 "Replace isInCarrierRoamingNbIotNtn() with"" into main

parents 2b609022 73a7887e
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -692,13 +692,12 @@ public abstract class InboundSmsHandler extends StateMachine {
        if (mFeatureFlags.carrierRoamingNbIotNtn()) {
            if (result == Intents.RESULT_SMS_HANDLED) {
                SatelliteController satelliteController = SatelliteController.getInstance();
                if (satelliteController == null) {
                    log("SatelliteController is not initialized");
                    return;
                }
                if (satelliteController != null
                        && satelliteController.shouldSendSmsToDatagramDispatcher(mPhone)) {
                    satelliteController.onSmsReceived(mPhone.getSubId());
                }
            }
        }

        // RESULT_OK means that the SMS will be acknowledged by special handling,
        // e.g. for SMS-PP data download. Any other result, we should ack here.
+3 −1
Original line number Diff line number Diff line
@@ -1257,8 +1257,10 @@ public class DatagramDispatcher extends Handler {
    }

    private boolean shouldPollMtSms() {
        SatelliteController satelliteController = SatelliteController.getInstance();
        Phone satellitePhone = satelliteController.getSatellitePhone();
        return isEnabledMtSmsPolling()
                && SatelliteController.getInstance().isInCarrierRoamingNbIotNtn();
                && satelliteController.shouldSendSmsToDatagramDispatcher(satellitePhone);
    }

    @GuardedBy("mLock")
+1 −1
Original line number Diff line number Diff line
@@ -7835,7 +7835,7 @@ public class SatelliteController extends Handler {
    }

    /** Returns whether to send SMS to DatagramDispatcher or not. */
    public boolean shouldSendSmsToDatagramDispatcher(@NonNull Phone phone) {
    public boolean shouldSendSmsToDatagramDispatcher(@Nullable Phone phone) {
        if (!isInCarrierRoamingNbIotNtn(phone)) {
            return false;
        }