Merge "Add N/A for NR SA in RadioInfo" am: 8c59c022fa am: 87dc21efae
Original change: https://android-review.googlesource.com/c/platform/packages/services/Telephony/+/1921320
Change-Id: I217d9168248f73974b7826ea3a6b5ea0e07360ad
diff --git a/src/com/android/phone/settings/RadioInfo.java b/src/com/android/phone/settings/RadioInfo.java
index 7681a02..7bf4697 100644
--- a/src/com/android/phone/settings/RadioInfo.java
+++ b/src/com/android/phone/settings/RadioInfo.java
@@ -1125,24 +1125,28 @@
& TelephonyManager.NETWORK_TYPE_BITMASK_NR) == 0) {
return;
}
-
ServiceState ss = serviceState;
if (ss == null && mPhone != null) {
ss = mPhone.getServiceState();
}
if (ss != null) {
+ boolean isNrSa = ss.getDataNetworkType() == TelephonyManager.NETWORK_TYPE_NR;
NetworkRegistrationInfo nri = ss.getNetworkRegistrationInfo(
NetworkRegistrationInfo.DOMAIN_PS, AccessNetworkConstants.TRANSPORT_TYPE_WWAN);
if (nri != null) {
DataSpecificRegistrationInfo dsri = nri.getDataSpecificInfo();
if (dsri != null) {
- mEndcAvailable.setText(dsri.isEnDcAvailable ? "True" : "False");
- mDcnrRestricted.setText(dsri.isDcNrRestricted ? "True" : "False");
- mNrAvailable.setText(dsri.isNrAvailable ? "True" : "False");
+ mEndcAvailable.setText(isNrSa ? "N/A"
+ : dsri.isEnDcAvailable ? "True" : "False");
+ mDcnrRestricted.setText(isNrSa ? "N/A"
+ : dsri.isDcNrRestricted ? "True" : "False");
+ mNrAvailable.setText(isNrSa ? "N/A" : dsri.isNrAvailable ? "True" : "False");
}
}
- mNrState.setText(NetworkRegistrationInfo.nrStateToString(ss.getNrState()));
- mNrFrequency.setText(ServiceState.frequencyRangeToString(ss.getNrFrequencyRange()));
+ mNrState.setText(isNrSa ? "N/A"
+ : NetworkRegistrationInfo.nrStateToString(ss.getNrState()));
+ mNrFrequency.setText(isNrSa ? "N/A"
+ : ServiceState.frequencyRangeToString(ss.getNrFrequencyRange()));
}
Executor simpleExecutor = (r) -> r.run();