From b32797b2021068eca7bdaf81de2d48654a47abf4 Mon Sep 17 00:00:00 2001 From: Shuo Qian Date: Wed, 29 Jan 2020 10:31:35 -0800 Subject: [PATCH] Create the ID for each gating key. Modify the names and descriptions per Compat team requirement. Test: Treehugger Bug: 148534348 Bug: 148535736 Bug: 147600208 Change-Id: Id9d0366714aa4ecb240d2b9e726d35a474879325 --- .../java/android/telephony/PreciseDataConnectionState.java | 7 ++++--- telephony/java/android/telephony/TelephonyManager.java | 6 +++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/telephony/java/android/telephony/PreciseDataConnectionState.java b/telephony/java/android/telephony/PreciseDataConnectionState.java index 094b8b0d16310..54c22ae282fb2 100644 --- a/telephony/java/android/telephony/PreciseDataConnectionState.java +++ b/telephony/java/android/telephony/PreciseDataConnectionState.java @@ -135,11 +135,12 @@ public final class PreciseDataConnectionState implements Parcelable { } /** - * To check the SDK version for {@code PreciseDataConnectionState#getDataConnectionState}. + * Used for checking if the SDK version for + * {@code PreciseDataConnectionState#getDataConnectionState} is above Q. */ @ChangeId @EnabledAfter(targetSdkVersion = Build.VERSION_CODES.Q) - private static final long GET_DATA_CONNECTION_STATE_CODE_CHANGE = 147600208L; + private static final long GET_DATA_CONNECTION_STATE_R_VERSION = 148535736L; /** * Returns the state of data connection that supported the apn types returned by @@ -152,7 +153,7 @@ public final class PreciseDataConnectionState implements Parcelable { @SystemApi public @DataState int getDataConnectionState() { if (mState == TelephonyManager.DATA_DISCONNECTING - && !Compatibility.isChangeEnabled(GET_DATA_CONNECTION_STATE_CODE_CHANGE)) { + && !Compatibility.isChangeEnabled(GET_DATA_CONNECTION_STATE_R_VERSION)) { return TelephonyManager.DATA_CONNECTED; } diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index 26dc5f01e67b7..672352211089e 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -5562,11 +5562,11 @@ public class TelephonyManager { public static final int DATA_DISCONNECTING = 4; /** - * To check the SDK version for {@link TelephonyManager#getDataState}. + * Used for checking if the SDK version for {@link TelephonyManager#getDataState} is above Q. */ @ChangeId @EnabledAfter(targetSdkVersion = Build.VERSION_CODES.Q) - private static final long GET_DATA_STATE_CODE_CHANGE = 147600208L; + private static final long GET_DATA_STATE_R_VERSION = 148534348L; /** * Returns a constant indicating the current data connection state @@ -5586,7 +5586,7 @@ public class TelephonyManager { int state = telephony.getDataStateForSubId( getSubId(SubscriptionManager.getActiveDataSubscriptionId())); if (state == TelephonyManager.DATA_DISCONNECTING - && !Compatibility.isChangeEnabled(GET_DATA_STATE_CODE_CHANGE)) { + && !Compatibility.isChangeEnabled(GET_DATA_STATE_R_VERSION)) { return TelephonyManager.DATA_CONNECTED; }