Merge changes from topic "presubmit-am-b36d3cf7498841d4a684ea497f8526c1" into tm-dev

* changes:
  Document the QNS behavior
  Partially revert ag/17294635
This commit is contained in:
Jack Yu
2022-03-26 15:55:43 +00:00
committed by Android (Google) Code Review

View File

@@ -26,6 +26,7 @@ import android.os.IBinder;
import android.os.Looper; import android.os.Looper;
import android.os.Message; import android.os.Message;
import android.os.RemoteException; import android.os.RemoteException;
import android.telephony.AccessNetworkConstants;
import android.telephony.AccessNetworkConstants.AccessNetworkType; import android.telephony.AccessNetworkConstants.AccessNetworkType;
import android.telephony.Annotation.ApnType; import android.telephony.Annotation.ApnType;
import android.util.Log; import android.util.Log;
@@ -134,26 +135,31 @@ public abstract class QualifiedNetworksService extends Service {
* invoked for certain APN types, then frameworks uses its own logic to determine the * invoked for certain APN types, then frameworks uses its own logic to determine the
* transport to setup the data network. * transport to setup the data network.
* *
* For example, QNS can suggest frameworks to setup IMS on IWLAN by specifying * For example, QNS can suggest frameworks setting up IMS data network on IWLAN by
* {@link ApnSetting#TYPE_IMS} with a list containing single element * specifying {@link ApnSetting#TYPE_IMS} with a list containing
* {@link AccessNetworkType#IWLAN}. * {@link AccessNetworkType#IWLAN}.
* *
* Or if QNS consider multiple access networks are qualified for certain APN type, it can * If QNS considers multiple access networks qualified for certain APN type, it can
* suggest frameworks by specifying the APN type with multiple elements in the list like * suggest frameworks by specifying the APN type with multiple access networks in the list,
* {{@link AccessNetworkType#EUTRAN}, {@link AccessNetworkType#IWLAN}}. Frameworks will then * for example {{@link AccessNetworkType#EUTRAN}, {@link AccessNetworkType#IWLAN}}.
* first attempt to setup data on LTE network. If the device moves from LTE to UMTS, then * Frameworks will then first attempt to setup data on LTE network, and If the device moves
* frameworks can perform handover the data network to the second preferred access network * from LTE to UMTS, then frameworks will perform handover the data network to the second
* if available. * preferred access network if available.
* *
* If the {@code qualifiedNetworkTypes} list is empty, it means QNS has no suggestion to the * If the {@code qualifiedNetworkTypes} list is empty, it means QNS has no suggestion to the
* frameworks, and frameworks will decide the transport to setup the data network. * frameworks, and for that APN type frameworks will route the corresponding network
* requests to {@link AccessNetworkConstants#TRANSPORT_TYPE_WWAN}.
* *
* @param apnTypes APN types of the qualified networks. This must be a bitmask combination * @param apnTypes APN type(s) of the qualified networks. This must be a bitmask combination
* of {@link ApnType}. * of {@link ApnType}. The same qualified networks will be applicable to all APN types
* @param qualifiedNetworkTypes List of network types which are qualified for data * specified here.
* connection setup for {@link @apnType} in the preferred order. Each element in the list * @param qualifiedNetworkTypes List of access network types which are qualified for data
* is a {@link AccessNetworkType}. Note that {@link AccessNetworkType#UNKNOWN} is not a * connection setup for {@code apnTypes} in the preferred order. Empty list means QNS has no
* valid input here. * suggestion to the frameworks, and for that APN type frameworks will route the
* corresponding network requests to {@link AccessNetworkConstants#TRANSPORT_TYPE_WWAN}.
*
* If one of the element is invalid, for example, {@link AccessNetworkType#UNKNOWN}, then
* this operation becomes a no-op.
*/ */
public final void updateQualifiedNetworkTypes( public final void updateQualifiedNetworkTypes(
@ApnType int apnTypes, @NonNull List<Integer> qualifiedNetworkTypes) { @ApnType int apnTypes, @NonNull List<Integer> qualifiedNetworkTypes) {