Merge "Fix incorrect API comments of getSubId()"
This commit is contained in:
@@ -166,7 +166,6 @@ public class TelephonyManager {
|
|||||||
/** @hide */
|
/** @hide */
|
||||||
static public final int OTASP_SIM_UNPROVISIONED = 5;
|
static public final int OTASP_SIM_UNPROVISIONED = 5;
|
||||||
|
|
||||||
|
|
||||||
/** @hide */
|
/** @hide */
|
||||||
static public final int KEY_TYPE_EPDG = 1;
|
static public final int KEY_TYPE_EPDG = 1;
|
||||||
|
|
||||||
@@ -2914,7 +2913,7 @@ public class TelephonyManager {
|
|||||||
* of time the mode may be unknown.
|
* of time the mode may be unknown.
|
||||||
*
|
*
|
||||||
* <p>If this object has been created with {@link #createForSubscriptionId}, applies to the
|
* <p>If this object has been created with {@link #createForSubscriptionId}, applies to the
|
||||||
* given subId. Otherwise, applies to {@link SubscriptionManager#getDefaultDataSubscriptionId()}
|
* given subId. Otherwise, applies to {@link SubscriptionManager#getDefaultSubscriptionId()}
|
||||||
*
|
*
|
||||||
* @return {@link PhoneConstants#LTE_ON_CDMA_UNKNOWN}, {@link PhoneConstants#LTE_ON_CDMA_FALSE}
|
* @return {@link PhoneConstants#LTE_ON_CDMA_UNKNOWN}, {@link PhoneConstants#LTE_ON_CDMA_FALSE}
|
||||||
* or {@link PhoneConstants#LTE_ON_CDMA_TRUE}
|
* or {@link PhoneConstants#LTE_ON_CDMA_TRUE}
|
||||||
@@ -5949,7 +5948,7 @@ public class TelephonyManager {
|
|||||||
* Sets the network selection mode to automatic.
|
* Sets the network selection mode to automatic.
|
||||||
*
|
*
|
||||||
* <p>If this object has been created with {@link #createForSubscriptionId}, applies to the
|
* <p>If this object has been created with {@link #createForSubscriptionId}, applies to the
|
||||||
* given subId. Otherwise, applies to {@link SubscriptionManager#getDefaultDataSubscriptionId()}
|
* given subId. Otherwise, applies to {@link SubscriptionManager#getDefaultSubscriptionId()}
|
||||||
*
|
*
|
||||||
* <p>Requires Permission:
|
* <p>Requires Permission:
|
||||||
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} or that the calling
|
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} or that the calling
|
||||||
@@ -5974,7 +5973,7 @@ public class TelephonyManager {
|
|||||||
* Perform a radio scan and return the list of available networks.
|
* Perform a radio scan and return the list of available networks.
|
||||||
*
|
*
|
||||||
* <p>If this object has been created with {@link #createForSubscriptionId}, applies to the
|
* <p>If this object has been created with {@link #createForSubscriptionId}, applies to the
|
||||||
* given subId. Otherwise, applies to {@link SubscriptionManager#getDefaultDataSubscriptionId()}
|
* given subId. Otherwise, applies to {@link SubscriptionManager#getDefaultSubscriptionId()}
|
||||||
*
|
*
|
||||||
* <p> Note that this scan can take a long time (sometimes minutes) to happen.
|
* <p> Note that this scan can take a long time (sometimes minutes) to happen.
|
||||||
*
|
*
|
||||||
@@ -6053,7 +6052,7 @@ public class TelephonyManager {
|
|||||||
* Ask the radio to connect to the input network and change selection mode to manual.
|
* Ask the radio to connect to the input network and change selection mode to manual.
|
||||||
*
|
*
|
||||||
* <p>If this object has been created with {@link #createForSubscriptionId}, applies to the
|
* <p>If this object has been created with {@link #createForSubscriptionId}, applies to the
|
||||||
* given subId. Otherwise, applies to {@link SubscriptionManager#getDefaultDataSubscriptionId()}
|
* given subId. Otherwise, applies to {@link SubscriptionManager#getDefaultSubscriptionId()}
|
||||||
*
|
*
|
||||||
* <p>Requires Permission:
|
* <p>Requires Permission:
|
||||||
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} or that the calling
|
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} or that the calling
|
||||||
@@ -6078,7 +6077,7 @@ public class TelephonyManager {
|
|||||||
* Ask the radio to connect to the input network and change selection mode to manual.
|
* Ask the radio to connect to the input network and change selection mode to manual.
|
||||||
*
|
*
|
||||||
* <p>If this object has been created with {@link #createForSubscriptionId}, applies to the
|
* <p>If this object has been created with {@link #createForSubscriptionId}, applies to the
|
||||||
* given subId. Otherwise, applies to {@link SubscriptionManager#getDefaultDataSubscriptionId()}
|
* given subId. Otherwise, applies to {@link SubscriptionManager#getDefaultSubscriptionId()}
|
||||||
*
|
*
|
||||||
* <p>Requires Permission:
|
* <p>Requires Permission:
|
||||||
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} or that the calling
|
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} or that the calling
|
||||||
@@ -6111,7 +6110,7 @@ public class TelephonyManager {
|
|||||||
* Get the network selection mode.
|
* Get the network selection mode.
|
||||||
*
|
*
|
||||||
* <p>If this object has been created with {@link #createForSubscriptionId}, applies to the
|
* <p>If this object has been created with {@link #createForSubscriptionId}, applies to the
|
||||||
* given subId. Otherwise, applies to {@link SubscriptionManager#getDefaultDataSubscriptionId()}
|
* given subId. Otherwise, applies to {@link SubscriptionManager#getDefaultSubscriptionId()}
|
||||||
|
|
||||||
* @return the network selection mode.
|
* @return the network selection mode.
|
||||||
*
|
*
|
||||||
@@ -7001,7 +7000,8 @@ public class TelephonyManager {
|
|||||||
try {
|
try {
|
||||||
ITelephony telephony = getITelephony();
|
ITelephony telephony = getITelephony();
|
||||||
if (telephony != null) {
|
if (telephony != null) {
|
||||||
isDataRoamingEnabled = telephony.isDataRoamingEnabled(getSubId());
|
isDataRoamingEnabled = telephony.isDataRoamingEnabled(
|
||||||
|
getSubId(SubscriptionManager.getDefaultDataSubscriptionId()));
|
||||||
}
|
}
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
Log.e(TAG, "Error calling ITelephony#isDataRoamingEnabled", e);
|
Log.e(TAG, "Error calling ITelephony#isDataRoamingEnabled", e);
|
||||||
@@ -7013,7 +7013,7 @@ public class TelephonyManager {
|
|||||||
* Gets the roaming mode for CDMA phone.
|
* Gets the roaming mode for CDMA phone.
|
||||||
*
|
*
|
||||||
* <p>If this object has been created with {@link #createForSubscriptionId}, applies to the
|
* <p>If this object has been created with {@link #createForSubscriptionId}, applies to the
|
||||||
* given subId. Otherwise, applies to {@link SubscriptionManager#getDefaultDataSubscriptionId()}
|
* given subId. Otherwise, applies to {@link SubscriptionManager#getDefaultSubscriptionId()}
|
||||||
*
|
*
|
||||||
* @return one of {@link #CDMA_ROAMING_MODE_RADIO_DEFAULT}, {@link #CDMA_ROAMING_MODE_HOME},
|
* @return one of {@link #CDMA_ROAMING_MODE_RADIO_DEFAULT}, {@link #CDMA_ROAMING_MODE_HOME},
|
||||||
* {@link #CDMA_ROAMING_MODE_AFFILIATED}, {@link #CDMA_ROAMING_MODE_ANY}.
|
* {@link #CDMA_ROAMING_MODE_AFFILIATED}, {@link #CDMA_ROAMING_MODE_ANY}.
|
||||||
@@ -7038,7 +7038,7 @@ public class TelephonyManager {
|
|||||||
* Sets the roaming mode for CDMA phone to the given mode {@code mode}.
|
* Sets the roaming mode for CDMA phone to the given mode {@code mode}.
|
||||||
*
|
*
|
||||||
* <p>If this object has been created with {@link #createForSubscriptionId}, applies to the
|
* <p>If this object has been created with {@link #createForSubscriptionId}, applies to the
|
||||||
* given subId. Otherwise, applies to {@link SubscriptionManager#getDefaultDataSubscriptionId()}
|
* given subId. Otherwise, applies to {@link SubscriptionManager#getDefaultSubscriptionId()}
|
||||||
*
|
*
|
||||||
* @param mode should be one of {@link #CDMA_ROAMING_MODE_RADIO_DEFAULT},
|
* @param mode should be one of {@link #CDMA_ROAMING_MODE_RADIO_DEFAULT},
|
||||||
* {@link #CDMA_ROAMING_MODE_HOME}, {@link #CDMA_ROAMING_MODE_AFFILIATED},
|
* {@link #CDMA_ROAMING_MODE_HOME}, {@link #CDMA_ROAMING_MODE_AFFILIATED},
|
||||||
@@ -7107,7 +7107,8 @@ public class TelephonyManager {
|
|||||||
try {
|
try {
|
||||||
ITelephony telephony = getITelephony();
|
ITelephony telephony = getITelephony();
|
||||||
if (telephony != null) {
|
if (telephony != null) {
|
||||||
telephony.setDataRoamingEnabled(getSubId(), isEnabled);
|
telephony.setDataRoamingEnabled(
|
||||||
|
getSubId(SubscriptionManager.getDefaultDataSubscriptionId()), isEnabled);
|
||||||
}
|
}
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
Log.e(TAG, "Error calling ITelephony#setDataRoamingEnabled", e);
|
Log.e(TAG, "Error calling ITelephony#setDataRoamingEnabled", e);
|
||||||
@@ -7900,7 +7901,7 @@ public class TelephonyManager {
|
|||||||
* Returns the current {@link ServiceState} information.
|
* Returns the current {@link ServiceState} information.
|
||||||
*
|
*
|
||||||
* <p>If this object has been created with {@link #createForSubscriptionId}, applies to the
|
* <p>If this object has been created with {@link #createForSubscriptionId}, applies to the
|
||||||
* given subId. Otherwise, applies to {@link SubscriptionManager#getDefaultDataSubscriptionId()}
|
* given subId. Otherwise, applies to {@link SubscriptionManager#getDefaultSubscriptionId()}
|
||||||
*
|
*
|
||||||
* <p>Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
|
* <p>Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
|
||||||
* or that the calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
|
* or that the calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
|
||||||
@@ -8369,7 +8370,7 @@ public class TelephonyManager {
|
|||||||
* Checks if phone is in emergency callback mode.
|
* Checks if phone is in emergency callback mode.
|
||||||
*
|
*
|
||||||
* <p>If this object has been created with {@link #createForSubscriptionId}, applies to the
|
* <p>If this object has been created with {@link #createForSubscriptionId}, applies to the
|
||||||
* given subId. Otherwise, applies to {@link SubscriptionManager#getDefaultDataSubscriptionId()}
|
* given subId. Otherwise, applies to {@link SubscriptionManager#getDefaultSubscriptionId()}
|
||||||
*
|
*
|
||||||
* @return true if phone is in emergency callback mode.
|
* @return true if phone is in emergency callback mode.
|
||||||
* @hide
|
* @hide
|
||||||
|
|||||||
Reference in New Issue
Block a user