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

Commit a4f84b6c authored by Aishwarya Mallampati's avatar Aishwarya Mallampati
Browse files

Remove SMS from carrier roaming ntn available services if sim card is

not provisioned.

Bug: 399410606
Test: atest SatelliteControllerTest
Flag: EXEMPT bugfix
Change-Id: I048512cf72bd07a1b83fb916fa7c43018404e683
parent 7ad4e1f3
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -5405,7 +5405,7 @@ public class SatelliteController extends Handler {
            handleEntireProvisionMetricReport();
        }
        selectBindingSatelliteSubscription(false);
        evaluateCarrierRoamingNtnEligibilityChange();
        handleCarrierRoamingNtnAvailableServicesChanged();
    }

    private void updateCachedDeviceProvisionStatus() {
@@ -9420,6 +9420,12 @@ public class SatelliteController extends Handler {
                plogd("isP2PSmsDisallowedOnCarrierRoamingNtn: APKs do not supports P2P");
                return true;
            }

            if (!isSubscriptionProvisioned(subId)) {
                plogd("isP2PSmsDisallowedOnCarrierRoamingNtn: subId=" + subId
                        + " is not provisioned.");
                return true;
            }
        }
        plogd("isP2PSmsDisallowedOnCarrierRoamingNtn: P2P is supported");
        return false;
+7 −0
Original line number Diff line number Diff line
@@ -4980,6 +4980,13 @@ public class SatelliteControllerTest extends TelephonyTest {
        }
        assertTrue(mSatelliteControllerUT
                .isP2PSmsDisallowedOnCarrierRoamingNtn(/*subId*/ SUB_ID));

        mSatelliteControllerUT.isSatelliteProvisioned = true;
        mSatelliteControllerUT.setNtnSmsSupportedByMessagesApp(true);
        mSatelliteControllerUT.mIsApplicationSupportsP2P = true;
        processAllMessages();
        assertFalse(mSatelliteControllerUT
                .isP2PSmsDisallowedOnCarrierRoamingNtn(/*subId*/ SUB_ID));
    }

    @Test