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
This commit is contained in:
Aishwarya Mallamapti
2023-07-11 21:08:54 +00:00
parent 4b8bfd8e71
commit 0475350680

View File

@@ -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();
}