Merge "Update documentation for updateAvailableNetworks"

This commit is contained in:
Sooraj Sasindran
2019-03-29 17:21:54 +00:00
committed by Gerrit Code Review
2 changed files with 31 additions and 14 deletions

View File

@@ -27,8 +27,8 @@ import java.util.Objects;
/** /**
* Defines available network information which includes corresponding subscription id, * Defines available network information which includes corresponding subscription id,
* network plmns and corresponding priority to be used for network selection by Alternative Network * network plmns and corresponding priority to be used for network selection by Opportunistic
* Service. * Network Service when passed through {@link TelephonyManager#updateAvailableNetworks}
*/ */
public final class AvailableNetworkInfo implements Parcelable { public final class AvailableNetworkInfo implements Parcelable {
@@ -55,15 +55,19 @@ public final class AvailableNetworkInfo implements Parcelable {
/** /**
* Priority for the subscription id. * Priority for the subscription id.
* Priorities are in the range of 1 to 3 where 1 * Priorities are in the range of {@link AvailableNetworkInfo#PRIORITY_LOW} to
* has the highest priority. * {@link AvailableNetworkInfo#PRIORITY_HIGH}
* Among all networks available after network scan, subId with highest priority is chosen
* for network selection. If there are more than one subId with highest priority then the
* network with highest RSRP is chosen.
*/ */
private int mPriority; private int mPriority;
/** /**
* Describes the List of PLMN ids (MCC-MNC) associated with mSubId. * Describes the List of PLMN ids (MCC-MNC) associated with mSubId.
* If this entry is left empty, then the platform software will not scan the network * Opportunistic Network Service will scan and verify specified PLMNs are available.
* to revalidate the input else platform will scan and verify specified PLMNs are available. * If this entry is left empty, then the Opportunistic Network Service will not scan the network
* to validate the network availability.
*/ */
private ArrayList<String> mMccMncs; private ArrayList<String> mMccMncs;
@@ -71,8 +75,8 @@ public final class AvailableNetworkInfo implements Parcelable {
* Returns the frequency bands associated with the {@link #getMccMncs() MCC/MNCs}. * Returns the frequency bands associated with the {@link #getMccMncs() MCC/MNCs}.
* Opportunistic network service will use these bands to scan. * Opportunistic network service will use these bands to scan.
* *
* When no specific bands are specified (empty array or null) CBRS band (B48) will be * When no specific bands are specified (empty array or null) CBRS band
* used for network scan. * {@link AccessNetworkConstants.EutranBand.BAND_48} will be used for network scan.
* *
* See {@link AccessNetworkConstants} for details. * See {@link AccessNetworkConstants} for details.
*/ */
@@ -89,8 +93,12 @@ public final class AvailableNetworkInfo implements Parcelable {
} }
/** /**
* Return priority for the subscription id. Valid value will be within * Return priority for the subscription id.
* [{@link AvailableNetworkInfo#PRIORITY_HIGH}, {@link AvailableNetworkInfo#PRIORITY_LOW}] * Priorities are in the range of {@link AvailableNetworkInfo#PRIORITY_LOW} to
* {@link AvailableNetworkInfo#PRIORITY_HIGH}
* Among all networks available after network scan, subId with highest priority is chosen
* for network selection. If there are more than one subId with highest priority then the
* network with highest RSRP is chosen.
* @return priority level * @return priority level
*/ */
public int getPriority() { public int getPriority() {
@@ -99,8 +107,9 @@ public final class AvailableNetworkInfo implements Parcelable {
/** /**
* Return List of PLMN ids (MCC-MNC) associated with the sub ID. * Return List of PLMN ids (MCC-MNC) associated with the sub ID.
* If this entry is left empty, then the platform software will not scan the network * Opportunistic Network Service will scan and verify specified PLMNs are available.
* to revalidate the input. * If this entry is left empty, then the Opportunistic Network Service will not scan the network
* to validate the network availability.
* @return list of PLMN ids * @return list of PLMN ids
*/ */
public @NonNull List<String> getMccMncs() { public @NonNull List<String> getMccMncs() {
@@ -112,6 +121,9 @@ public final class AvailableNetworkInfo implements Parcelable {
* *
* The returned value is defined in either of {@link AccessNetworkConstants.GeranBand}, * The returned value is defined in either of {@link AccessNetworkConstants.GeranBand},
* {@link AccessNetworkConstants.UtranBand} and {@link AccessNetworkConstants.EutranBand} * {@link AccessNetworkConstants.UtranBand} and {@link AccessNetworkConstants.EutranBand}
* See {@link AccessNetworkConstants.AccessNetworkType} for details regarding different network
* types. When no specific bands are specified (empty array or null) CBRS band
* {@link AccessNetworkConstants.EutranBand#BAND_48} will be used for network scan.
*/ */
public @NonNull List<Integer> getBands() { public @NonNull List<Integer> getBands() {
return (List<Integer>) mBands.clone(); return (List<Integer>) mBands.clone();

View File

@@ -10385,6 +10385,9 @@ public class TelephonyManager {
/** /**
* Set preferred opportunistic data subscription id. * Set preferred opportunistic data subscription id.
* *
* Switch internet data to preferred opportunistic data subscription id. This api
* can result in lose of internet connectivity for short period of time while internet data
* is handed over.
* <p>Requires that the calling app has carrier privileges on both primary and * <p>Requires that the calling app has carrier privileges on both primary and
* secondary subscriptions (see * secondary subscriptions (see
* {@link #hasCarrierPrivileges}), or has permission * {@link #hasCarrierPrivileges}), or has permission
@@ -10463,9 +10466,11 @@ public class TelephonyManager {
* *
* This api should be called to inform OpportunisticNetwork Service about the availability * This api should be called to inform OpportunisticNetwork Service about the availability
* of a network at the current location. This information will be used by OpportunisticNetwork * of a network at the current location. This information will be used by OpportunisticNetwork
* service to decide to attach to the network opportunistically. If an empty list is passed, * service to enable modem stack and to attach to the network. If an empty list is passed,
* it is assumed that no network is available and will result in disabling the modem stack * it is assumed that no network is available and will result in disabling the modem stack
* to save power. * to save power. This api do not switch internet data once network attach is completed.
* Use {@link TelephonyManager#setPreferredOpportunisticDataSubscription}
* to switch internet data after network attach is complete.
* Requires that the calling app has carrier privileges on both primary and * Requires that the calling app has carrier privileges on both primary and
* secondary subscriptions (see {@link #hasCarrierPrivileges}), or has permission * secondary subscriptions (see {@link #hasCarrierPrivileges}), or has permission
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}. * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}.