From 4481b5181e95da77134f74501b0b68abe091ed90 Mon Sep 17 00:00:00 2001 From: Rambo Wang Date: Mon, 15 Mar 2021 12:14:18 -0700 Subject: [PATCH] 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 --- core/api/current.txt | 1 + core/java/android/provider/Telephony.java | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/core/api/current.txt b/core/api/current.txt index 82393f427f9b5..da7581442677e 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 9b65a7ce0509e..ddeb955e6ad06 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. + *

+ * Valid values: {@link ServiceState#DUPLEX_MODE_UNKNOWN}, + * {@link ServiceState#DUPLEX_MODE_FDD}, {@link ServiceState#DUPLEX_MODE_TDD}. + *

+ * This is the same as {@link ServiceState#getDuplexMode()}. + */ + public static final String DUPLEX_MODE = "duplex_mode"; } /**