summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Rambo Wang <rambowang@google.com> 2021-03-15 12:14:18 -0700
committer Rambo Wang <rambowang@google.com> 2021-03-23 09:27:42 -0700
commit4481b5181e95da77134f74501b0b68abe091ed90 (patch)
tree516bcf4f8931edbc85458a0402253634b21a0848
parent9446a5239fe2b66ca2fec700093fc112b7ccdd74 (diff)
Public ServiceState#duplexMode in telephony provider
ServiceState#getDuplexMode is a public API. Expose the same info through telephony provider to let applications retreive it without location permission. Bug: 182601774 Test: atest com.android.phone.ServiceStateProviderTest Change-Id: I19128c938993f351533aca9a8e1a1356e21eb30e
-rw-r--r--core/api/current.txt1
-rw-r--r--core/java/android/provider/Telephony.java11
2 files changed, 12 insertions, 0 deletions
diff --git a/core/api/current.txt b/core/api/current.txt
index 82393f427f9b..da7581442677 100644
--- a/core/api/current.txt
+++ b/core/api/current.txt
@@ -34220,6 +34220,7 @@ package android.provider {
field public static final String AUTHORITY = "service-state";
field public static final android.net.Uri CONTENT_URI;
field public static final String DATA_NETWORK_TYPE = "data_network_type";
+ field public static final String DUPLEX_MODE = "duplex_mode";
field public static final String IS_MANUAL_NETWORK_SELECTION = "is_manual_network_selection";
field public static final String VOICE_OPERATOR_NUMERIC = "voice_operator_numeric";
field public static final String VOICE_REG_STATE = "voice_reg_state";
diff --git a/core/java/android/provider/Telephony.java b/core/java/android/provider/Telephony.java
index 9b65a7ce0509..ddeb955e6ad0 100644
--- a/core/java/android/provider/Telephony.java
+++ b/core/java/android/provider/Telephony.java
@@ -4579,6 +4579,17 @@ public final class Telephony {
* This is the same as {@link TelephonyManager#getDataNetworkType()}.
*/
public static final String DATA_NETWORK_TYPE = "data_network_type";
+
+ /**
+ * An integer value indicating the current duplex mode if the radio technology is LTE,
+ * LTE-CA or NR.
+ * <p>
+ * Valid values: {@link ServiceState#DUPLEX_MODE_UNKNOWN},
+ * {@link ServiceState#DUPLEX_MODE_FDD}, {@link ServiceState#DUPLEX_MODE_TDD}.
+ * <p>
+ * This is the same as {@link ServiceState#getDuplexMode()}.
+ */
+ public static final String DUPLEX_MODE = "duplex_mode";
}
/**