Add Radio Interface Capabilities
* Introduces a set of capabilities specific for the radio interface
that are determined by the vendor and are then surfaced through
TelephonyManager.
* There are no capabilities yet defined and will come later in S
* Modified the phone boot up process to read these from the HAL first
Test: Added cts, ran cts, and std tests
Test: Tested that the proper log messages on the device both
during boot up and cts (eg. the logs were just shown once)
Bug: 163085807
Change-Id: I8a6c1c8c45feff98ea4bfaa81da76655168a3816
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
index 48b8fa5..722dfe7 100755
--- a/src/com/android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -85,6 +85,7 @@
import android.telephony.PhoneNumberRange;
import android.telephony.RadioAccessFamily;
import android.telephony.RadioAccessSpecifier;
+import android.telephony.RadioInterfaceCapabilities;
import android.telephony.ServiceState;
import android.telephony.SignalStrength;
import android.telephony.SubscriptionInfo;
@@ -9021,4 +9022,16 @@
Binder.restoreCallingIdentity(identity);
}
}
+
+ @Override
+ public boolean isRadioInterfaceCapabilitySupported(
+ @NonNull @TelephonyManager.RadioInterfaceCapability String capability) {
+ RadioInterfaceCapabilities radioInterfaceCapabilities =
+ mPhoneConfigurationManager.getRadioInterfaceCapabilities();
+ if (radioInterfaceCapabilities == null) {
+ throw new RuntimeException("radio interface capabilities are not available");
+ } else {
+ return radioInterfaceCapabilities.isSupported(capability);
+ }
+ }
}