From f2090b88b72d89825b9bf9c6ddbf5ae8a7f3116b Mon Sep 17 00:00:00 2001 From: Wink Saville Date: Fri, 5 Sep 2014 17:48:21 -0700 Subject: [PATCH] Unhide SubscriptionManager and SubInfoRecord Change-Id: I1e6efb4442f0400d404d725c7db5020a26c00f98 --- api/current.txt | 38 +++++++++++++++++++ .../java/android/telephony/SubInfoRecord.java | 1 - .../telephony/SubscriptionManager.java | 16 +------- 3 files changed, 39 insertions(+), 16 deletions(-) diff --git a/api/current.txt b/api/current.txt index 3417bdd88507d..fabec03de5bf7 100644 --- a/api/current.txt +++ b/api/current.txt @@ -28996,6 +28996,44 @@ package android.telephony { field public byte[] encodedScAddress; } + public class SubInfoRecord implements android.os.Parcelable { + ctor public SubInfoRecord(); + ctor public SubInfoRecord(long, java.lang.String, int, java.lang.String, int, int, java.lang.String, int, int, int[], int, int); + method public int describeContents(); + method public void writeToParcel(android.os.Parcel, int); + field public static final android.os.Parcelable.Creator CREATOR; + field public int color; + field public int dataRoaming; + field public java.lang.String displayName; + field public int displayNumberFormat; + field public java.lang.String iccId; + field public int mcc; + field public int mnc; + field public int nameSource; + field public java.lang.String number; + field public int[] simIconRes; + field public int slotId; + field public long subId; + } + + public class SubscriptionManager implements android.provider.BaseColumns { + method public static java.util.List getActiveSubInfoList(); + method public static long getDefaultSmsSubId(); + method public static int getSlotId(long); + method public static java.util.List getSubInfoUsingSlotId(int); + method public static android.telephony.SubInfoRecord getSubInfoUsingSubId(long); + method public static boolean isValidSubId(long); + field public static final long ASK_USER_SUB_ID = -1001L; // 0xfffffffffffffc17L + field public static final int DEFAULT_PHONE_ID = 2147483647; // 0x7fffffff + field public static final long DEFAULT_SUB_ID = 9223372036854775807L; // 0x7fffffffffffffffL + field public static final int INVALID_PHONE_ID = -1000; // 0xfffffc18 + field public static final int INVALID_SLOT_ID = -1000; // 0xfffffc18 + field public static final long INVALID_SUB_ID = -1000L; // 0xfffffffffffffc18L + field public static final java.lang.String MCC = "mcc"; + field public static final java.lang.String MNC = "mnc"; + field public static final int SIM_NOT_INSERTED = -1; // 0xffffffff + } + public class TelephonyManager { method public java.util.List getAllCellInfo(); method public int getCallState(); diff --git a/telephony/java/android/telephony/SubInfoRecord.java b/telephony/java/android/telephony/SubInfoRecord.java index 805f787c33c88..b9de8719a4cf9 100644 --- a/telephony/java/android/telephony/SubInfoRecord.java +++ b/telephony/java/android/telephony/SubInfoRecord.java @@ -21,7 +21,6 @@ import android.os.Parcelable; /** * A Parcelable class for Subscription Information. - * @hide - to be unhidden */ public class SubInfoRecord implements Parcelable { diff --git a/telephony/java/android/telephony/SubscriptionManager.java b/telephony/java/android/telephony/SubscriptionManager.java index d0f355e9e491d..ac50f01075dd7 100644 --- a/telephony/java/android/telephony/SubscriptionManager.java +++ b/telephony/java/android/telephony/SubscriptionManager.java @@ -37,8 +37,6 @@ import java.util.List; * * The android.Manifest.permission.READ_PHONE_STATE to retrieve the information, except * getActiveSubIdList and getActiveSubIdCount for which no permission is needed. - * - * @hide - to be unhidden */ public class SubscriptionManager implements BaseColumns { private static final String LOG_TAG = "SUB"; @@ -46,30 +44,25 @@ public class SubscriptionManager implements BaseColumns { private static final boolean VDBG = false; /** An invalid phone identifier */ - /** @hide - to be unhidden */ public static final int INVALID_PHONE_ID = -1000; /** Indicates the caller wants the default phone id. */ - /** @hide - to be unhidden */ public static final int DEFAULT_PHONE_ID = Integer.MAX_VALUE; /** An invalid slot identifier */ - /** @hide - to be unhidden */ public static final int INVALID_SLOT_ID = -1000; /** Indicates the caller wants the default slot id. */ /** @hide */ public static final int DEFAULT_SLOT_ID = Integer.MAX_VALUE; - /** Indicates the user should be asked which sub to use. */ - /** @hide */ + /** Indicates the user should be asked which subscription to use. */ public static final long ASK_USER_SUB_ID = -1001; /** An invalid subscription identifier */ public static final long INVALID_SUB_ID = -1000; /** Indicates the caller wants the default sub id. */ - /** @hide - to be unhidden */ public static final long DEFAULT_SUB_ID = Long.MAX_VALUE; /** @hide */ @@ -114,7 +107,6 @@ public class SubscriptionManager implements BaseColumns { public static final String SIM_ID = "sim_id"; /** SIM is not inserted */ - /** @hide - to be unhidden */ public static final int SIM_NOT_INSERTED = -1; /** @@ -263,7 +255,6 @@ public class SubscriptionManager implements BaseColumns { * Get the SubInfoRecord associated with the subId * @param subId The unique SubInfoRecord index in database * @return SubInfoRecord, maybe null - * @hide - to be unhidden */ public static SubInfoRecord getSubInfoForSubscriber(long subId) { if (!isValidSubId(subId)) { @@ -321,7 +312,6 @@ public class SubscriptionManager implements BaseColumns { * Get the SubInfoRecord according to slotId * @param slotId the slot which the SIM is inserted * @return SubInfoRecord list, maybe empty but not null - * @hide - to be unhidden */ public static List getSubInfoUsingSlotId(int slotId) { // FIXME: Consider never returning null @@ -377,7 +367,6 @@ public class SubscriptionManager implements BaseColumns { /** * Get the SubInfoRecord(s) of the currently inserted SIM(s) * @return Array list of currently inserted SubInfoRecord(s) maybe empty but not null - * @hide - to be unhidden */ public static List getActiveSubInfoList() { List result = null; @@ -634,7 +623,6 @@ public class SubscriptionManager implements BaseColumns { * Get slotId associated with the subscription. * @return slotId as a positive integer or a negative value if an error either * SIM_NOT_INSERTED or INVALID_SLOT_ID. - * @hide - to be unhidden */ public static int getSlotId(long subId) { if (!isValidSubId(subId)) { @@ -793,7 +781,6 @@ public class SubscriptionManager implements BaseColumns { /** * @return subId of the DefaultSms subscription or the value INVALID_SUB_ID if an error. - * @hide - to be unhidden */ public static long getDefaultSmsSubId() { long subId = INVALID_SUB_ID; @@ -922,7 +909,6 @@ public class SubscriptionManager implements BaseColumns { /** * @return true if a valid subId else false - * @hide - to be unhidden */ public static boolean isValidSubId(long subId) { return subId > INVALID_SUB_ID ;