From 09a7773583657c1de8c51e33f8bdd8b571738f9a Mon Sep 17 00:00:00 2001 From: Eric Schwarzenbach Date: Thu, 18 Jan 2018 14:42:00 -0800 Subject: [PATCH] Add ServiceState APIs for carrier aggregation. Adds getDuplexMode, getChannelNumber, and getCellBandwidths to ServiceState. Bug: 72117602 Test: runtest Change-Id: I04be7d0a7d88693ef21b252ecc21aa974c2f89c8 --- api/current.txt | 6 ++ .../java/android/telephony/ServiceState.java | 89 +++++++++++++++++++ 2 files changed, 95 insertions(+) diff --git a/api/current.txt b/api/current.txt index 7954bf5539871..918a3283cdae8 100644 --- a/api/current.txt +++ b/api/current.txt @@ -40529,6 +40529,9 @@ package android.telephony { ctor public ServiceState(android.os.Parcel); method protected void copyFrom(android.telephony.ServiceState); method public int describeContents(); + method public int[] getCellBandwidths(); + method public int getChannelNumber(); + method public int getDuplexMode(); method public boolean getIsManualSelection(); method public int getNetworkId(); method public java.lang.String getOperatorAlphaLong(); @@ -40545,6 +40548,9 @@ package android.telephony { method public void setStateOutOfService(); method public void writeToParcel(android.os.Parcel, int); field public static final android.os.Parcelable.Creator CREATOR; + field public static final int DUPLEX_MODE_FDD = 1; // 0x1 + field public static final int DUPLEX_MODE_TDD = 2; // 0x2 + field public static final int DUPLEX_MODE_UNKNOWN = 0; // 0x0 field public static final int STATE_EMERGENCY_ONLY = 2; // 0x2 field public static final int STATE_IN_SERVICE = 0; // 0x0 field public static final int STATE_OUT_OF_SERVICE = 1; // 0x1 diff --git a/telephony/java/android/telephony/ServiceState.java b/telephony/java/android/telephony/ServiceState.java index 77706e8fc54f8..90a3677d1796a 100644 --- a/telephony/java/android/telephony/ServiceState.java +++ b/telephony/java/android/telephony/ServiceState.java @@ -17,6 +17,7 @@ package android.telephony; import android.annotation.IntDef; +import android.annotation.Nullable; import android.annotation.SystemApi; import android.os.Bundle; import android.os.Parcel; @@ -25,6 +26,7 @@ import android.text.TextUtils; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; +import java.util.Arrays; import java.util.ArrayList; import java.util.List; @@ -36,6 +38,7 @@ import java.util.List; * *