diff options
author | Wink Saville <wink@google.com> | 2014-10-23 10:44:45 -0700 |
---|---|---|
committer | Wink Saville <wink@google.com> | 2014-10-23 21:54:09 -0700 |
commit | 63f03dd94c43c22f2c77306059b5748e5e1e0e3c (patch) | |
tree | 33f7e7e60dfb17a98e387a8c8bed02f76a7151b6 /telephony/java/android | |
parent | ee57224c0f96b4a4e26fe89f40509b32ea4b3602 (diff) | |
download | frameworks_base-63f03dd94c43c22f2c77306059b5748e5e1e0e3c.zip frameworks_base-63f03dd94c43c22f2c77306059b5748e5e1e0e3c.tar.gz frameworks_base-63f03dd94c43c22f2c77306059b5748e5e1e0e3c.tar.bz2 |
Change subId to int from long
Change-Id: Idae6335e63e7b1e4e714bc17e71b1a4705e38474
Diffstat (limited to 'telephony/java/android')
5 files changed, 95 insertions, 95 deletions
diff --git a/telephony/java/android/telephony/PhoneNumberUtils.java b/telephony/java/android/telephony/PhoneNumberUtils.java index 27e9baf..897702d 100644 --- a/telephony/java/android/telephony/PhoneNumberUtils.java +++ b/telephony/java/android/telephony/PhoneNumberUtils.java @@ -1570,7 +1570,7 @@ public class PhoneNumberUtils * listed in the RIL / SIM, otherwise return false. * @hide */ - public static boolean isEmergencyNumber(long subId, String number) { + public static boolean isEmergencyNumber(int subId, String number) { // Return true only if the specified number *exactly* matches // one of the emergency numbers listed by the RIL / SIM. return isEmergencyNumberInternal(subId, number, true /* useExactMatch */); @@ -1620,7 +1620,7 @@ public class PhoneNumberUtils * same digits as any of those emergency numbers. * @hide */ - public static boolean isPotentialEmergencyNumber(long subId, String number) { + public static boolean isPotentialEmergencyNumber(int subId, String number) { // Check against the emergency numbers listed by the RIL / SIM, // and *don't* require an exact match. return isEmergencyNumberInternal(subId, number, false /* useExactMatch */); @@ -1669,7 +1669,7 @@ public class PhoneNumberUtils * @return true if the number is in the list of emergency numbers * listed in the RIL / sim, otherwise return false. */ - private static boolean isEmergencyNumberInternal(long subId, String number, + private static boolean isEmergencyNumberInternal(int subId, String number, boolean useExactMatch) { return isEmergencyNumberInternal(subId, number, null, useExactMatch); } @@ -1698,7 +1698,7 @@ public class PhoneNumberUtils * otherwise false * @hide */ - public static boolean isEmergencyNumber(long subId, String number, String defaultCountryIso) { + public static boolean isEmergencyNumber(int subId, String number, String defaultCountryIso) { return isEmergencyNumberInternal(subId, number, defaultCountryIso, true /* useExactMatch */); @@ -1750,7 +1750,7 @@ public class PhoneNumberUtils * any of those emergency numbers. * @hide */ - public static boolean isPotentialEmergencyNumber(long subId, String number, + public static boolean isPotentialEmergencyNumber(int subId, String number, String defaultCountryIso) { return isEmergencyNumberInternal(subId, number, defaultCountryIso, @@ -1794,7 +1794,7 @@ public class PhoneNumberUtils * @return true if the number is an emergency number for the specified country. * @hide */ - private static boolean isEmergencyNumberInternal(long subId, String number, + private static boolean isEmergencyNumberInternal(int subId, String number, String defaultCountryIso, boolean useExactMatch) { // If the number passed in is null, just return false: @@ -1911,7 +1911,7 @@ public class PhoneNumberUtils * is currently in. * @hide */ - public static boolean isLocalEmergencyNumber(Context context, long subId, String number) { + public static boolean isLocalEmergencyNumber(Context context, int subId, String number) { return isLocalEmergencyNumberInternal(subId, number, context, true /* useExactMatch */); @@ -1965,7 +1965,7 @@ public class PhoneNumberUtils * * @hide */ - public static boolean isPotentialLocalEmergencyNumber(Context context, long subId, + public static boolean isPotentialLocalEmergencyNumber(Context context, int subId, String number) { return isLocalEmergencyNumberInternal(subId, number, context, @@ -2014,7 +2014,7 @@ public class PhoneNumberUtils * local country, based on the CountryDetector. * @hide */ - private static boolean isLocalEmergencyNumberInternal(long subId, String number, + private static boolean isLocalEmergencyNumberInternal(int subId, String number, Context context, boolean useExactMatch) { String countryIso; @@ -2057,7 +2057,7 @@ public class PhoneNumberUtils * to read the VM number. * @hide */ - public static boolean isVoiceMailNumber(long subId, String number) { + public static boolean isVoiceMailNumber(int subId, String number) { String vmNumber; try { @@ -2796,7 +2796,7 @@ public class PhoneNumberUtils /** * Returns Default voice subscription Id. */ - private static long getDefaultVoiceSubId() { + private static int getDefaultVoiceSubId() { return SubscriptionManager.getDefaultVoiceSubId(); } //==== End of utility methods used only in compareStrictly() ===== diff --git a/telephony/java/android/telephony/PhoneStateListener.java b/telephony/java/android/telephony/PhoneStateListener.java index ec34ce8..2f1a8da 100644 --- a/telephony/java/android/telephony/PhoneStateListener.java +++ b/telephony/java/android/telephony/PhoneStateListener.java @@ -227,7 +227,7 @@ public class PhoneStateListener { * @hide */ /** @hide */ - protected long mSubId = SubscriptionManager.INVALID_SUB_ID; + protected int mSubId = SubscriptionManager.INVALID_SUB_ID; private final Handler mHandler; @@ -252,10 +252,10 @@ public class PhoneStateListener { /** * Create a PhoneStateListener for the Phone using the specified subscription. * This class requires Looper.myLooper() not return null. To supply your - * own non-null Looper use PhoneStateListener(long subId, Looper looper) below. + * own non-null Looper use PhoneStateListener(int subId, Looper looper) below. * @hide */ - public PhoneStateListener(long subId) { + public PhoneStateListener(int subId) { this(subId, Looper.myLooper()); } @@ -264,7 +264,7 @@ public class PhoneStateListener { * and non-null Looper. * @hide */ - public PhoneStateListener(long subId, Looper looper) { + public PhoneStateListener(int subId, Looper looper) { if (DBG) log("ctor: subId=" + subId + " looper=" + looper); mSubId = subId; mHandler = new Handler(looper) { diff --git a/telephony/java/android/telephony/SubInfoRecord.java b/telephony/java/android/telephony/SubInfoRecord.java index f2df079..4a3d67e 100644 --- a/telephony/java/android/telephony/SubInfoRecord.java +++ b/telephony/java/android/telephony/SubInfoRecord.java @@ -29,7 +29,7 @@ public class SubInfoRecord implements Parcelable { * Subscription Identifier, this is a device unique number * and not an index into an array */ - public long subId; + public int subId; /** The GID for a SIM that maybe associated with this subscription, empty if unknown */ public String iccId; /** @@ -91,7 +91,7 @@ public class SubInfoRecord implements Parcelable { this.mnc = 0; } - public SubInfoRecord(long subId, String iccId, int slotId, String displayName, int nameSource, + public SubInfoRecord(int subId, String iccId, int slotId, String displayName, int nameSource, int color, String number, int displayFormat, int roaming, int[] iconRes, int mcc, int mnc) { this.subId = subId; @@ -136,7 +136,7 @@ public class SubInfoRecord implements Parcelable { public static final Parcelable.Creator<SubInfoRecord> CREATOR = new Parcelable.Creator<SubInfoRecord>() { @Override public SubInfoRecord createFromParcel(Parcel source) { - long subId = source.readLong(); + int subId = source.readInt(); String iccId = source.readString(); int slotId = source.readInt(); String displayName = source.readString(); @@ -162,7 +162,7 @@ public class SubInfoRecord implements Parcelable { @Override public void writeToParcel(Parcel dest, int flags) { - dest.writeLong(subId); + dest.writeInt(subId); dest.writeString(iccId); dest.writeInt(slotId); dest.writeString(displayName); diff --git a/telephony/java/android/telephony/SubscriptionManager.java b/telephony/java/android/telephony/SubscriptionManager.java index c96c383..c3ad826 100644 --- a/telephony/java/android/telephony/SubscriptionManager.java +++ b/telephony/java/android/telephony/SubscriptionManager.java @@ -57,21 +57,21 @@ public class SubscriptionManager implements BaseColumns { public static final int DEFAULT_SLOT_ID = Integer.MAX_VALUE; /** Indicates the user should be asked which subscription to use. */ - public static final long ASK_USER_SUB_ID = -1001; + public static final int ASK_USER_SUB_ID = -1001; /** An invalid subscription identifier */ - public static final long INVALID_SUB_ID = -1000; + public static final int INVALID_SUB_ID = -1000; /** Indicates the caller wants the default sub id. */ - public static final long DEFAULT_SUB_ID = Long.MAX_VALUE; + public static final int DEFAULT_SUB_ID = Integer.MAX_VALUE; /** Minimum possible subid that represents a subscription */ /** @hide */ - public static final long MIN_SUB_ID_VALUE = 0; + public static final int MIN_SUB_ID_VALUE = 0; /** Maximum possible subid that represents a subscription */ /** @hide */ - public static final long MAX_SUB_ID_VALUE = DEFAULT_SUB_ID - 1; + public static final int MAX_SUB_ID_VALUE = DEFAULT_SUB_ID - 1; /** @hide */ @@ -265,7 +265,7 @@ public class SubscriptionManager implements BaseColumns { * @param subId The unique SubInfoRecord index in database * @return SubInfoRecord, maybe null */ - public static SubInfoRecord getSubInfoForSubscriber(long subId) { + public static SubInfoRecord getSubInfoForSubscriber(int subId) { if (!isValidSubId(subId)) { logd("[getSubInfoForSubscriberx]- invalid subId"); return null; @@ -475,7 +475,7 @@ public class SubscriptionManager implements BaseColumns { * @return the number of records updated * @hide */ - public static int setColor(int color, long subId) { + public static int setColor(int color, int subId) { if (VDBG) logd("[setColor]+ color:" + color + " subId:" + subId); int size = sSimBackgroundDarkRes.length; if (!isValidSubId(subId) || color < 0 || color >= size) { @@ -505,7 +505,7 @@ public class SubscriptionManager implements BaseColumns { * @return the number of records updated * @hide */ - public static int setDisplayName(String displayName, long subId) { + public static int setDisplayName(String displayName, int subId) { return setDisplayName(displayName, subId, NAME_SOURCE_UNDEFINDED); } @@ -518,7 +518,7 @@ public class SubscriptionManager implements BaseColumns { * @return the number of records updated or -1 if invalid subId * @hide */ - public static int setDisplayName(String displayName, long subId, long nameSource) { + public static int setDisplayName(String displayName, int subId, long nameSource) { if (VDBG) { logd("[setDisplayName]+ displayName:" + displayName + " subId:" + subId + " nameSource:" + nameSource); @@ -550,7 +550,7 @@ public class SubscriptionManager implements BaseColumns { * @return the number of records updated * @hide */ - public static int setDisplayNumber(String number, long subId) { + public static int setDisplayNumber(String number, int subId) { if (number == null || !isValidSubId(subId)) { logd("[setDisplayNumber]- fail"); return -1; @@ -578,7 +578,7 @@ public class SubscriptionManager implements BaseColumns { * @return the number of records updated * @hide */ - public static int setDisplayNumberFormat(int format, long subId) { + public static int setDisplayNumberFormat(int format, int subId) { if (VDBG) logd("[setDisplayNumberFormat]+ format:" + format + " subId:" + subId); if (format < 0 || !isValidSubId(subId)) { logd("[setDisplayNumberFormat]- fail, return -1"); @@ -607,7 +607,7 @@ public class SubscriptionManager implements BaseColumns { * @return the number of records updated * @hide */ - public static int setDataRoaming(int roaming, long subId) { + public static int setDataRoaming(int roaming, int subId) { if (VDBG) logd("[setDataRoaming]+ roaming:" + roaming + " subId:" + subId); if (roaming < 0 || !isValidSubId(subId)) { logd("[setDataRoaming]- fail"); @@ -633,7 +633,7 @@ public class SubscriptionManager implements BaseColumns { * @return slotId as a positive integer or a negative value if an error either * SIM_NOT_INSERTED or INVALID_SLOT_ID. */ - public static int getSlotId(long subId) { + public static int getSlotId(int subId) { if (!isValidSubId(subId)) { logd("[getSlotId]- fail"); } @@ -654,13 +654,13 @@ public class SubscriptionManager implements BaseColumns { } /** @hide */ - public static long[] getSubId(int slotId) { + public static int[] getSubId(int slotId) { if (!isValidSlotId(slotId)) { logd("[getSubId]- fail"); return null; } - long[] subId = null; + int[] subId = null; try { ISub iSub = ISub.Stub.asInterface(ServiceManager.getService("isub")); @@ -675,7 +675,7 @@ public class SubscriptionManager implements BaseColumns { } /** @hide */ - public static int getPhoneId(long subId) { + public static int getPhoneId(int subId) { if (!isValidSubId(subId)) { logd("[getPhoneId]- fail"); return INVALID_PHONE_ID; @@ -732,8 +732,8 @@ public class SubscriptionManager implements BaseColumns { * getDefaultDataSubId(). * @hide */ - public static long getDefaultSubId() { - long subId = INVALID_SUB_ID; + public static int getDefaultSubId() { + int subId = INVALID_SUB_ID; try { ISub iSub = ISub.Stub.asInterface(ServiceManager.getService("isub")); @@ -749,8 +749,8 @@ public class SubscriptionManager implements BaseColumns { } /** @hide */ - public static long getDefaultVoiceSubId() { - long subId = INVALID_SUB_ID; + public static int getDefaultVoiceSubId() { + int subId = INVALID_SUB_ID; try { ISub iSub = ISub.Stub.asInterface(ServiceManager.getService("isub")); @@ -766,7 +766,7 @@ public class SubscriptionManager implements BaseColumns { } /** @hide */ - public static void setDefaultVoiceSubId(long subId) { + public static void setDefaultVoiceSubId(int subId) { if (VDBG) logd("setDefaultVoiceSubId sub id = " + subId); try { ISub iSub = ISub.Stub.asInterface(ServiceManager.getService("isub")); @@ -791,8 +791,8 @@ public class SubscriptionManager implements BaseColumns { /** * @return subId of the DefaultSms subscription or the value INVALID_SUB_ID if an error. */ - public static long getDefaultSmsSubId() { - long subId = INVALID_SUB_ID; + public static int getDefaultSmsSubId() { + int subId = INVALID_SUB_ID; try { ISub iSub = ISub.Stub.asInterface(ServiceManager.getService("isub")); @@ -808,7 +808,7 @@ public class SubscriptionManager implements BaseColumns { } /** @hide */ - public static void setDefaultSmsSubId(long subId) { + public static void setDefaultSmsSubId(int subId) { if (VDBG) logd("setDefaultSmsSubId sub id = " + subId); try { ISub iSub = ISub.Stub.asInterface(ServiceManager.getService("isub")); @@ -831,8 +831,8 @@ public class SubscriptionManager implements BaseColumns { } /** @hide */ - public static long getDefaultDataSubId() { - long subId = INVALID_SUB_ID; + public static int getDefaultDataSubId() { + int subId = INVALID_SUB_ID; try { ISub iSub = ISub.Stub.asInterface(ServiceManager.getService("isub")); @@ -848,7 +848,7 @@ public class SubscriptionManager implements BaseColumns { } /** @hide */ - public static void setDefaultDataSubId(long subId) { + public static void setDefaultDataSubId(int subId) { if (VDBG) logd("setDataSubscription sub id = " + subId); try { ISub iSub = ISub.Stub.asInterface(ServiceManager.getService("isub")); @@ -919,7 +919,7 @@ public class SubscriptionManager implements BaseColumns { /** * @return true if a valid subId else false */ - public static boolean isValidSubId(long subId) { + public static boolean isValidSubId(int subId) { return subId > INVALID_SUB_ID ; } @@ -928,7 +928,7 @@ public class SubscriptionManager implements BaseColumns { * usable subId means its neither a INVALID_SUB_ID nor a DEFAUL_SUB_ID. * @hide */ - public static boolean isUsableSubIdValue(long subId) { + public static boolean isUsableSubIdValue(int subId) { return subId >= MIN_SUB_ID_VALUE && subId <= MAX_SUB_ID_VALUE; } @@ -952,7 +952,7 @@ public class SubscriptionManager implements BaseColumns { /** @hide */ public static void putPhoneIdAndSubIdExtra(Intent intent, int phoneId) { - long[] subIds = SubscriptionManager.getSubId(phoneId); + int[] subIds = SubscriptionManager.getSubId(phoneId); if (subIds != null && subIds.length > 0) { putPhoneIdAndSubIdExtra(intent, phoneId, subIds[0]); } else { @@ -961,7 +961,7 @@ public class SubscriptionManager implements BaseColumns { } /** @hide */ - public static void putPhoneIdAndSubIdExtra(Intent intent, int phoneId, long subId) { + public static void putPhoneIdAndSubIdExtra(Intent intent, int phoneId, int subId) { if (VDBG) logd("putPhoneIdAndSubIdExtra: phoneId=" + phoneId + " subId=" + subId); intent.putExtra(PhoneConstants.SUBSCRIPTION_KEY, subId); intent.putExtra(PhoneConstants.PHONE_KEY, phoneId); @@ -975,8 +975,8 @@ public class SubscriptionManager implements BaseColumns { * is never null but the length maybe 0. * @hide */ - public static long[] getActiveSubIdList() { - long[] subId = null; + public static int[] getActiveSubIdList() { + int[] subId = null; try { ISub iSub = ISub.Stub.asInterface(ServiceManager.getService("isub")); @@ -988,7 +988,7 @@ public class SubscriptionManager implements BaseColumns { } if (subId == null) { - subId = new long[0]; + subId = new int[0]; } return subId; diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index 7b5234a..a3546ed 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -588,7 +588,7 @@ public class TelephonyManager { /** {@hide} */ public String getDeviceSoftwareVersion(int slotId) { // FIXME methods taking slot id should not use subscription, instead us Uicc directly - long[] subId = SubscriptionManager.getSubId(slotId); + int[] subId = SubscriptionManager.getSubId(slotId); if (subId == null || subId.length == 0) { return null; } @@ -624,7 +624,7 @@ public class TelephonyManager { /** {@hide} */ public String getDeviceId(int slotId) { // FIXME methods taking slot id should not use subscription, instead us Uicc directly - long[] subId = SubscriptionManager.getSubId(slotId); + int[] subId = SubscriptionManager.getSubId(slotId); if (subId == null || subId.length == 0) { return null; } @@ -658,7 +658,7 @@ public class TelephonyManager { */ /** {@hide} */ public String getImei(int slotId) { - long[] subId = SubscriptionManager.getSubId(slotId); + int[] subId = SubscriptionManager.getSubId(slotId); try { return getSubscriberInfo().getImeiForSubscriber(subId[0]); } catch (RemoteException ex) { @@ -684,7 +684,7 @@ public class TelephonyManager { */ /** {@hide}*/ public String getNai(int slotId) { - long[] subId = SubscriptionManager.getSubId(slotId); + int[] subId = SubscriptionManager.getSubId(slotId); try { return getSubscriberInfo().getNaiForSubscriber(subId[0]); } catch (RemoteException ex) { @@ -748,7 +748,7 @@ public class TelephonyManager { * @param subId for which the location updates are enabled */ /** @hide */ - public void enableLocationUpdates(long subId) { + public void enableLocationUpdates(int subId) { try { getITelephony().enableLocationUpdatesForSubscriber(subId); } catch (RemoteException ex) { @@ -770,7 +770,7 @@ public class TelephonyManager { } /** @hide */ - public void disableLocationUpdates(long subId) { + public void disableLocationUpdates(int subId) { try { getITelephony().disableLocationUpdatesForSubscriber(subId); } catch (RemoteException ex) { @@ -835,7 +835,7 @@ public class TelephonyManager { */ /** {@hide} */ @SystemApi - public int getCurrentPhoneType(long subId) { + public int getCurrentPhoneType(int subId) { int phoneId = SubscriptionManager.getPhoneId(subId); try{ ITelephony telephony = getITelephony(); @@ -1047,7 +1047,7 @@ public class TelephonyManager { * @param subId */ /** {@hide} */ - public String getNetworkOperatorName(long subId) { + public String getNetworkOperatorName(int subId) { int phoneId = SubscriptionManager.getPhoneId(subId); return getTelephonyProperty(phoneId, TelephonyProperties.PROPERTY_OPERATOR_ALPHA, ""); } @@ -1074,7 +1074,7 @@ public class TelephonyManager { * @param subId */ /** {@hide} */ - public String getNetworkOperator(long subId) { + public String getNetworkOperator(int subId) { int phoneId = SubscriptionManager.getPhoneId(subId); return getTelephonyProperty(phoneId, TelephonyProperties.PROPERTY_OPERATOR_NUMERIC, ""); } @@ -1098,7 +1098,7 @@ public class TelephonyManager { * @param subId */ /** {@hide} */ - public boolean isNetworkRoaming(long subId) { + public boolean isNetworkRoaming(int subId) { int phoneId = SubscriptionManager.getPhoneId(subId); return Boolean.parseBoolean(getTelephonyProperty(phoneId, TelephonyProperties.PROPERTY_OPERATOR_ISROAMING, null)); @@ -1127,7 +1127,7 @@ public class TelephonyManager { * @param subId for which Network CountryIso is returned */ /** {@hide} */ - public String getNetworkCountryIso(long subId) { + public String getNetworkCountryIso(int subId) { int phoneId = SubscriptionManager.getPhoneId(subId); return getTelephonyProperty(phoneId, TelephonyProperties.PROPERTY_OPERATOR_ISO_COUNTRY, ""); } @@ -1199,7 +1199,7 @@ public class TelephonyManager { * @see #NETWORK_TYPE_HSPAP */ /** {@hide} */ - public int getNetworkType(long subId) { + public int getNetworkType(int subId) { try { ITelephony telephony = getITelephony(); if (telephony != null) { @@ -1253,7 +1253,7 @@ public class TelephonyManager { * @param subId for which network type is returned */ /** {@hide} */ - public int getDataNetworkType(long subId) { + public int getDataNetworkType(int subId) { try{ ITelephony telephony = getITelephony(); if (telephony != null) { @@ -1285,7 +1285,7 @@ public class TelephonyManager { * */ /** {@hide} */ - public int getVoiceNetworkType(long subId) { + public int getVoiceNetworkType(int subId) { try{ ITelephony telephony = getITelephony(); if (telephony != null) { @@ -1442,7 +1442,7 @@ public class TelephonyManager { */ /** {@hide} */ // FIXME Input argument slotId should be of type int - public boolean hasIccCard(long slotId) { + public boolean hasIccCard(int slotId) { try { return getITelephony().hasIccCardUsingSlotId(slotId); @@ -1487,7 +1487,7 @@ public class TelephonyManager { /** {@hide} */ // FIXME the argument to pass is subId ?? public int getSimState(int slotId) { - long[] subId = SubscriptionManager.getSubId(slotId); + int[] subId = SubscriptionManager.getSubId(slotId); if (subId == null || subId.length == 0) { return SIM_STATE_ABSENT; } @@ -1527,7 +1527,7 @@ public class TelephonyManager { * @see #getSimState */ public String getSimOperator() { - long subId = SubscriptionManager.getDefaultDataSubId(); + int subId = SubscriptionManager.getDefaultDataSubId(); if (!SubscriptionManager.isUsableSubIdValue(subId)) { subId = SubscriptionManager.getDefaultSmsSubId(); if (!SubscriptionManager.isUsableSubIdValue(subId)) { @@ -1552,7 +1552,7 @@ public class TelephonyManager { * @param subId for which SimOperator is returned */ /** {@hide} */ - public String getSimOperator(long subId) { + public String getSimOperator(int subId) { int phoneId = SubscriptionManager.getPhoneId(subId); String operator = getTelephonyProperty(phoneId, TelephonyProperties.PROPERTY_ICC_OPERATOR_NUMERIC, ""); @@ -1581,7 +1581,7 @@ public class TelephonyManager { * @param subId for which SimOperatorName is returned */ /** {@hide} */ - public String getSimOperatorName(long subId) { + public String getSimOperatorName(int subId) { int phoneId = SubscriptionManager.getPhoneId(subId); return getTelephonyProperty(phoneId, TelephonyProperties.PROPERTY_ICC_OPERATOR_ALPHA, ""); } @@ -1599,7 +1599,7 @@ public class TelephonyManager { * @param subId for which SimCountryIso is returned */ /** {@hide} */ - public String getSimCountryIso(long subId) { + public String getSimCountryIso(int subId) { int phoneId = SubscriptionManager.getPhoneId(subId); return getTelephonyProperty(phoneId, TelephonyProperties.PROPERTY_ICC_OPERATOR_ISO_COUNTRY, ""); @@ -1625,7 +1625,7 @@ public class TelephonyManager { * {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE} */ /** {@hide} */ - public String getSimSerialNumber(long subId) { + public String getSimSerialNumber(int subId) { try { return getSubscriberInfo().getIccSerialNumberForSubscriber(subId); } catch (RemoteException ex) { @@ -1661,7 +1661,7 @@ public class TelephonyManager { * */ /** {@hide} */ - public int getLteOnCdmaMode(long subId) { + public int getLteOnCdmaMode(int subId) { try { return getITelephony().getLteOnCdmaModeForSubscriber(subId); } catch (RemoteException ex) { @@ -1701,7 +1701,7 @@ public class TelephonyManager { * @param subId whose subscriber id is returned */ /** {@hide} */ - public String getSubscriberId(long subId) { + public String getSubscriberId(int subId) { try { return getSubscriberInfo().getSubscriberIdForSubscriber(subId); } catch (RemoteException ex) { @@ -1740,7 +1740,7 @@ public class TelephonyManager { * @param subscription whose subscriber id is returned */ /** {@hide} */ - public String getGroupIdLevel1(long subId) { + public String getGroupIdLevel1(int subId) { try { return getSubscriberInfo().getGroupIdLevel1ForSubscriber(subId); } catch (RemoteException ex) { @@ -1772,7 +1772,7 @@ public class TelephonyManager { * @param subId whose phone number for line 1 is returned */ /** {@hide} */ - public String getLine1NumberForSubscriber(long subId) { + public String getLine1NumberForSubscriber(int subId) { String number = null; try { number = getITelephony().getLine1NumberForDisplay(subId); @@ -1824,7 +1824,7 @@ public class TelephonyManager { * @param number The dialing number * @hide */ - public void setLine1NumberForDisplayForSubscriber(long subId, String alphaTag, String number) { + public void setLine1NumberForDisplayForSubscriber(int subId, String alphaTag, String number) { try { getITelephony().setLine1NumberForDisplayForSubscriber(subId, alphaTag, number); } catch (RemoteException ex) { @@ -1856,7 +1856,7 @@ public class TelephonyManager { * nobody seems to call this. */ /** {@hide} */ - public String getLine1AlphaTagForSubscriber(long subId) { + public String getLine1AlphaTagForSubscriber(int subId) { String alphaTag = null; try { alphaTag = getITelephony().getLine1AlphaTagForDisplay(subId); @@ -1899,7 +1899,7 @@ public class TelephonyManager { * @param subId for which msisdn is returned */ /** {@hide} */ - public String getMsisdn(long subId) { + public String getMsisdn(int subId) { try { return getSubscriberInfo().getMsisdnForSubscriber(subId); } catch (RemoteException ex) { @@ -1929,7 +1929,7 @@ public class TelephonyManager { * @param subId whose voice mail number is returned */ /** {@hide} */ - public String getVoiceMailNumber(long subId) { + public String getVoiceMailNumber(int subId) { try { return getSubscriberInfo().getVoiceMailNumberForSubscriber(subId); } catch (RemoteException ex) { @@ -1961,7 +1961,7 @@ public class TelephonyManager { * @param subId */ /** {@hide} */ - public String getCompleteVoiceMailNumber(long subId) { + public String getCompleteVoiceMailNumber(int subId) { try { return getSubscriberInfo().getCompleteVoiceMailNumberForSubscriber(subId); } catch (RemoteException ex) { @@ -1991,7 +1991,7 @@ public class TelephonyManager { * @param subId whose voice message count is returned */ /** {@hide} */ - public int getVoiceMessageCount(long subId) { + public int getVoiceMessageCount(int subId) { try { return getITelephony().getVoiceMessageCountForSubscriber(subId); } catch (RemoteException ex) { @@ -2023,7 +2023,7 @@ public class TelephonyManager { * voice mail number is returned */ /** {@hide} */ - public String getVoiceMailAlphaTag(long subId) { + public String getVoiceMailAlphaTag(int subId) { try { return getSubscriberInfo().getVoiceMailAlphaTagForSubscriber(subId); } catch (RemoteException ex) { @@ -2120,7 +2120,7 @@ public class TelephonyManager { * @param subId whose call state is returned */ /** {@hide} */ - public int getCallState(long subId) { + public int getCallState(int subId) { try { return getITelephony().getCallStateForSubscriber(subId); } catch (RemoteException ex) { @@ -2271,7 +2271,7 @@ public class TelephonyManager { * Returns the CDMA ERI icon index to display for a subscription */ /** {@hide} */ - public int getCdmaEriIconIndex(long subId) { + public int getCdmaEriIconIndex(int subId) { try { return getITelephony().getCdmaEriIconIndexForSubscriber(subId); } catch (RemoteException ex) { @@ -2299,7 +2299,7 @@ public class TelephonyManager { * 1 - FLASHING */ /** {@hide} */ - public int getCdmaEriIconMode(long subId) { + public int getCdmaEriIconMode(int subId) { try { return getITelephony().getCdmaEriIconModeForSubscriber(subId); } catch (RemoteException ex) { @@ -2324,7 +2324,7 @@ public class TelephonyManager { * */ /** {@hide} */ - public String getCdmaEriText(long subId) { + public String getCdmaEriText(int subId) { try { return getITelephony().getCdmaEriTextForSubscriber(subId); } catch (RemoteException ex) { @@ -2696,7 +2696,7 @@ public class TelephonyManager { /** * Returns Default subscription. */ - private static long getDefaultSubscription() { + private static int getDefaultSubscription() { return SubscriptionManager.getDefaultSubId(); } @@ -2938,7 +2938,7 @@ public class TelephonyManager { * @return the response of SIM Authentication, or null if not available * @hide */ - public String getIccSimChallengeResponse(long subId, int appType, String data) { + public String getIccSimChallengeResponse(int subId, int appType, String data) { try { return getSubscriberInfo().getIccSimChallengeResponse(subId, appType, data); } catch (RemoteException ex) { @@ -3119,7 +3119,7 @@ public class TelephonyManager { /** @hide */ @SystemApi - public String getCdmaMdn(long subId) { + public String getCdmaMdn(int subId) { try { return getITelephony().getCdmaMdn(subId); } catch (RemoteException ex) { @@ -3137,7 +3137,7 @@ public class TelephonyManager { /** @hide */ @SystemApi - public String getCdmaMin(long subId) { + public String getCdmaMin(int subId) { try { return getITelephony().getCdmaMin(subId); } catch (RemoteException ex) { @@ -3468,7 +3468,7 @@ public class TelephonyManager { * @param enable true means enabling the simplified UI. * @hide */ - public void enableSimplifiedNetworkSettingsForSubscriber(long subId, boolean enable) { + public void enableSimplifiedNetworkSettingsForSubscriber(int subId, boolean enable) { try { getITelephony().enableSimplifiedNetworkSettingsForSubscriber(subId, enable); } catch (RemoteException ex) { @@ -3501,7 +3501,7 @@ public class TelephonyManager { * @return true if the simplified UI is enabled. * @hide */ - public boolean getSimplifiedNetworkSettingsEnabledForSubscriber(long subId) { + public boolean getSimplifiedNetworkSettingsEnabledForSubscriber(int subId) { try { return getITelephony().getSimplifiedNetworkSettingsEnabledForSubscriber(subId); } catch (RemoteException ex) { |