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

Commit 04753506 authored by Aishwarya Mallamapti's avatar Aishwarya Mallamapti
Browse files

Block data call

If network is a non-terrestrial network, block data requests with
NET_CAPABILITY_INTERNET.

Bug: 287114765
Test: Flashed build on raven-userdebug and performed basic functionality
tests,
atest DataNetworkControllerTest#testNonTerrestrialNetworkChanged

Change-Id: I76c6b9e357cc3914e77fa5b6c4f1ca3406e441f0
parent 4b8bfd8e
Loading
Loading
Loading
Loading
+14 −1
Original line number Diff line number Diff line
@@ -772,6 +772,18 @@ public final class NetworkRegistrationInfo implements Parcelable {
        }
    }

    /**
     * Convert isNonTerrestrialNetwork to string
     *
     * @param isNonTerrestrialNetwork boolean indicating whether network is a non-terrestrial
     *                                network
     * @return string format of isNonTerrestrialNetwork.
     * @hide
     */
    public static String isNonTerrestrialNetworkToString(boolean isNonTerrestrialNetwork) {
        return isNonTerrestrialNetwork ? "NON-TERRESTRIAL" : "TERRESTRIAL";
    }

    @NonNull
    @Override
    public String toString() {
@@ -797,7 +809,8 @@ public final class NetworkRegistrationInfo implements Parcelable {
                        ? nrStateToString(mNrState) : "****")
                .append(" rRplmn=").append(mRplmn)
                .append(" isUsingCarrierAggregation=").append(mIsUsingCarrierAggregation)
                .append(" isNonTerrestrialNetwork=").append(mIsNonTerrestrialNetwork)
                .append(" isNonTerrestrialNetwork=").append(
                        isNonTerrestrialNetworkToString(mIsNonTerrestrialNetwork))
                .append("}").toString();
    }