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

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

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

Merge "Remove SMS from carrier roaming ntn available services if sim card is not provisioned." into main
parents 3f34d777 a4f84b6c
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -5394,7 +5394,7 @@ public class SatelliteController extends Handler {
            handleEntireProvisionMetricReport();
        }
        selectBindingSatelliteSubscription(false);
        evaluateCarrierRoamingNtnEligibilityChange();
        handleCarrierRoamingNtnAvailableServicesChanged();
    }

    private void updateCachedDeviceProvisionStatus() {
@@ -9414,6 +9414,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
@@ -4981,6 +4981,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