summaryrefslogtreecommitdiffstats
path: root/telephony/java
diff options
context:
space:
mode:
Diffstat (limited to 'telephony/java')
-rw-r--r--telephony/java/android/telephony/SubscriptionInfo.java24
-rw-r--r--telephony/java/android/telephony/SubscriptionManager.java16
-rw-r--r--telephony/java/android/telephony/TelephonyManager.java4
-rw-r--r--telephony/java/com/android/internal/telephony/ITelephonyRegistry.aidl4
4 files changed, 24 insertions, 24 deletions
diff --git a/telephony/java/android/telephony/SubscriptionInfo.java b/telephony/java/android/telephony/SubscriptionInfo.java
index e57f9e3..adbe1d8 100644
--- a/telephony/java/android/telephony/SubscriptionInfo.java
+++ b/telephony/java/android/telephony/SubscriptionInfo.java
@@ -129,28 +129,28 @@ public class SubscriptionInfo implements Parcelable {
}
/**
- * Returns the subscription ID.
+ * @return the subscription ID.
*/
public int getSubscriptionId() {
return this.mId;
}
/**
- * Returns the ICC ID.
+ * @return the ICC ID.
*/
public String getIccId() {
return this.mIccId;
}
/**
- * Returns the slot index of this Subscription's SIM card.
+ * @return the slot index of this Subscription's SIM card.
*/
public int getSimSlotIndex() {
return this.mSimSlotIndex;
}
/**
- * Returns the name displayed to the user that identifies this subscription
+ * @return the name displayed to the user that identifies this subscription
*/
public CharSequence getDisplayName() {
return this.mDisplayName;
@@ -165,7 +165,7 @@ public class SubscriptionInfo implements Parcelable {
}
/**
- * Returns the name displayed to the user that identifies Subscription provider name
+ * @return the name displayed to the user that identifies Subscription provider name
*/
public CharSequence getCarrierName() {
return this.mCarrierName;
@@ -180,8 +180,9 @@ public class SubscriptionInfo implements Parcelable {
}
/**
- * Return the source of the name, eg NAME_SOURCE_UNDEFINED, NAME_SOURCE_DEFAULT_SOURCE,
+ * @return the source of the name, eg NAME_SOURCE_UNDEFINED, NAME_SOURCE_DEFAULT_SOURCE,
* NAME_SOURCE_SIM_SOURCE or NAME_SOURCE_USER_INPUT.
+ * @hide
*/
public int getNameSource() {
return this.mNameSource;
@@ -246,35 +247,36 @@ public class SubscriptionInfo implements Parcelable {
}
/**
- * Returns the number of this subscription.
+ * @return the number of this subscription.
*/
public String getNumber() {
return mNumber;
}
/**
- * Return the data roaming value.
+ * @return the data roaming state for this subscription, either
+ * {@link SubscriptionManager#DATA_ROAMING_ENABLE} or {@link SubscriptionManager#DATA_ROAMING_DISABLE}.
*/
public int getDataRoaming() {
return this.mDataRoaming;
}
/**
- * Returns the MCC.
+ * @return the MCC.
*/
public int getMcc() {
return this.mMcc;
}
/**
- * Returns the MNC.
+ * @return the MNC.
*/
public int getMnc() {
return this.mMnc;
}
/**
- * Returns the ISO country code
+ * @return the ISO country code
*/
public String getCountryIso() {
return this.mCountryIso;
diff --git a/telephony/java/android/telephony/SubscriptionManager.java b/telephony/java/android/telephony/SubscriptionManager.java
index d174f47..c67629d 100644
--- a/telephony/java/android/telephony/SubscriptionManager.java
+++ b/telephony/java/android/telephony/SubscriptionManager.java
@@ -226,10 +226,10 @@ public class SubscriptionManager {
/** @hide */
public static final String DATA_ROAMING = "data_roaming";
- /** @hide */
+ /** Indicates that data roaming is enabled for a subscription */
public static final int DATA_ROAMING_ENABLE = 1;
- /** @hide */
+ /** Indicates that data roaming is disabled for a subscription */
public static final int DATA_ROAMING_DISABLE = 0;
/** @hide */
@@ -266,9 +266,9 @@ public class SubscriptionManager {
* A listener class for monitoring changes to {@link SubscriptionInfo} records.
* <p>
* Override the onSubscriptionsChanged method in the object that extends this
- * class and pass it to {@link #registerOnSubscriptionsChangedListener(OnSubscriptionsChangedListener)}
+ * class and pass it to {@link #addOnSubscriptionsChangedListener(OnSubscriptionsChangedListener)}
* to register your listener and to unregister invoke
- * {@link #unregisterOnSubscriptionsChangedListener(OnSubscriptionsChangedListener)}
+ * {@link #removeOnSubscriptionsChangedListener(OnSubscriptionsChangedListener)}
* <p>
* Permissions android.Manifest.permission.READ_PHONE_STATE is required
* for #onSubscriptionsChanged to be invoked.
@@ -340,7 +340,7 @@ public class SubscriptionManager {
* @param listener an instance of {@link OnSubscriptionsChangedListener} with
* onSubscriptionsChanged overridden.
*/
- public void registerOnSubscriptionsChangedListener(OnSubscriptionsChangedListener listener) {
+ public void addOnSubscriptionsChangedListener(OnSubscriptionsChangedListener listener) {
String pkgForDebug = mContext != null ? mContext.getPackageName() : "<unknown>";
if (DBG) {
logd("register OnSubscriptionsChangedListener pkgForDebug=" + pkgForDebug
@@ -352,7 +352,7 @@ public class SubscriptionManager {
ITelephonyRegistry tr = ITelephonyRegistry.Stub.asInterface(ServiceManager.getService(
"telephony.registry"));
if (tr != null) {
- tr.registerOnSubscriptionsChangedListener(pkgForDebug, listener.callback);
+ tr.addOnSubscriptionsChangedListener(pkgForDebug, listener.callback);
}
} catch (RemoteException ex) {
// Should not happen
@@ -366,7 +366,7 @@ public class SubscriptionManager {
*
* @param listener that is to be unregistered.
*/
- public void unregisterOnSubscriptionsChangedListener(OnSubscriptionsChangedListener listener) {
+ public void removeOnSubscriptionsChangedListener(OnSubscriptionsChangedListener listener) {
String pkgForDebug = mContext != null ? mContext.getPackageName() : "<unknown>";
if (DBG) {
logd("unregister OnSubscriptionsChangedListener pkgForDebug=" + pkgForDebug
@@ -378,7 +378,7 @@ public class SubscriptionManager {
ITelephonyRegistry tr = ITelephonyRegistry.Stub.asInterface(ServiceManager.getService(
"telephony.registry"));
if (tr != null) {
- tr.unregisterOnSubscriptionsChangedListener(pkgForDebug, listener.callback);
+ tr.removeOnSubscriptionsChangedListener(pkgForDebug, listener.callback);
}
} catch (RemoteException ex) {
// Should not happen
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index 9df693c..caa4fd0 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -3103,7 +3103,7 @@ public class TelephonyManager {
*
* @return true on success; false on any failure.
*/
- public boolean setGlobalPreferredNetworkType() {
+ public boolean setPreferredNetworkTypeToGlobal() {
return setPreferredNetworkType(RILConstants.NETWORK_MODE_LTE_CDMA_EVDO_GSM_WCDMA);
}
@@ -3146,8 +3146,6 @@ public class TelephonyManager {
* call will return true. This access is granted by the owner of the UICC
* card and does not depend on the registered carrier.
*
- * TODO: Add a link to documentation.
- *
* @return true if the app has carrier privileges.
*/
public boolean hasCarrierPrivileges() {
diff --git a/telephony/java/com/android/internal/telephony/ITelephonyRegistry.aidl b/telephony/java/com/android/internal/telephony/ITelephonyRegistry.aidl
index ba62f5f..7d8a8d6 100644
--- a/telephony/java/com/android/internal/telephony/ITelephonyRegistry.aidl
+++ b/telephony/java/com/android/internal/telephony/ITelephonyRegistry.aidl
@@ -30,9 +30,9 @@ import com.android.internal.telephony.IPhoneStateListener;
import com.android.internal.telephony.IOnSubscriptionsChangedListener;
interface ITelephonyRegistry {
- void registerOnSubscriptionsChangedListener(String pkg,
+ void addOnSubscriptionsChangedListener(String pkg,
IOnSubscriptionsChangedListener callback);
- void unregisterOnSubscriptionsChangedListener(String pkg,
+ void removeOnSubscriptionsChangedListener(String pkg,
IOnSubscriptionsChangedListener callback);
void listen(String pkg, IPhoneStateListener callback, int events, boolean notifyNow);
void listenForSubscriber(in int subId, String pkg, IPhoneStateListener callback, int events,