Merge "Add isAospDomainSelectionService to TelephonyManager" into main
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index f076de3..25e2d82 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -19266,6 +19266,26 @@
}
/**
+ * Returns whether the AOSP domain selection service is supported.
+ *
+ * @return {@code true} if the AOSP domain selection service is supported.
+ * @hide
+ */
+ @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
+ @RequiresFeature(PackageManager.FEATURE_TELEPHONY_CALLING)
+ public boolean isAospDomainSelectionService() {
+ try {
+ ITelephony telephony = getITelephony();
+ if (telephony != null) {
+ return telephony.isAospDomainSelectionService();
+ }
+ } catch (RemoteException ex) {
+ Rlog.w(TAG, "RemoteException", ex);
+ }
+ return false;
+ }
+
+ /**
* Returns the primary IMEI (International Mobile Equipment Identity) of the device as
* mentioned in GSMA TS.37. {@link #getImei(int)} returns the IMEI that belongs to the selected
* slotID whereas this API {@link #getPrimaryImei()} returns primary IMEI of the device.
diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl
index f591f40..d4da736 100644
--- a/telephony/java/com/android/internal/telephony/ITelephony.aidl
+++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl
@@ -3245,6 +3245,12 @@
boolean clearDomainSelectionServiceOverride();
/**
+ * @return {@code true} if the AOSP domain selection service is supported,
+ * {@code false} otherwise.
+ */
+ boolean isAospDomainSelectionService();
+
+ /**
* Enable or disable notifications sent for cellular identifier disclosure events.
*
* Disclosure events are defined as instances where a device has sent a cellular identifier