Merge "Changed the onQualifiedNetworkTypesChanged API"
am: aa08473294
Change-Id: I138cdb9c4f2f77f7f0938e46cb5bb5db09dac2d5
This commit is contained in:
@@ -22,5 +22,5 @@ package android.telephony.data;
|
|||||||
*/
|
*/
|
||||||
oneway interface IQualifiedNetworksServiceCallback
|
oneway interface IQualifiedNetworksServiceCallback
|
||||||
{
|
{
|
||||||
void onQualifiedNetworkTypesChanged(int apnType, in int[] qualifiedNetworkTypesList);
|
void onQualifiedNetworkTypesChanged(int apnTypes, in int[] qualifiedNetworkTypes);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -121,27 +121,28 @@ public abstract class QualifiedNetworksService extends Service {
|
|||||||
/**
|
/**
|
||||||
* Update the qualified networks list. Network availability updater must invoke this method
|
* Update the qualified networks list. Network availability updater must invoke this method
|
||||||
* whenever the qualified networks changes. If this method is never invoked for certain
|
* whenever the qualified networks changes. If this method is never invoked for certain
|
||||||
* APN type, then frameworks will always use the default (i.e. cellular) data and network
|
* APN types, then frameworks will always use the default (i.e. cellular) data and network
|
||||||
* service.
|
* service.
|
||||||
*
|
*
|
||||||
* @param apnType APN type of the qualified networks
|
* @param apnTypes APN types of the qualified networks. This must be a bitmask combination
|
||||||
|
* of {@link ApnSetting.ApnType}.
|
||||||
* @param qualifiedNetworkTypes List of network types which are qualified for data
|
* @param qualifiedNetworkTypes List of network types which are qualified for data
|
||||||
* connection setup for {@link @apnType} in the preferred order. Each element in the array
|
* connection setup for {@link @apnType} in the preferred order. Each element in the array
|
||||||
* is a {@link AccessNetworkType}. An empty list or null indicates no networks are qualified
|
* is a {@link AccessNetworkType}. An empty list or null indicates no networks are qualified
|
||||||
* for data setup.
|
* for data setup.
|
||||||
*/
|
*/
|
||||||
public final void updateQualifiedNetworkTypes(@ApnType int apnType,
|
public final void updateQualifiedNetworkTypes(@ApnType int apnTypes,
|
||||||
int[] qualifiedNetworkTypes) {
|
int[] qualifiedNetworkTypes) {
|
||||||
mHandler.obtainMessage(QNS_UPDATE_QUALIFIED_NETWORKS, mSlotIndex, apnType,
|
mHandler.obtainMessage(QNS_UPDATE_QUALIFIED_NETWORKS, mSlotIndex, apnTypes,
|
||||||
qualifiedNetworkTypes).sendToTarget();
|
qualifiedNetworkTypes).sendToTarget();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onUpdateQualifiedNetworkTypes(@ApnType int apnType,
|
private void onUpdateQualifiedNetworkTypes(@ApnType int apnTypes,
|
||||||
int[] qualifiedNetworkTypes) {
|
int[] qualifiedNetworkTypes) {
|
||||||
mQualifiedNetworkTypesList.put(apnType, qualifiedNetworkTypes);
|
mQualifiedNetworkTypesList.put(apnTypes, qualifiedNetworkTypes);
|
||||||
if (mCallback != null) {
|
if (mCallback != null) {
|
||||||
try {
|
try {
|
||||||
mCallback.onQualifiedNetworkTypesChanged(apnType, qualifiedNetworkTypes);
|
mCallback.onQualifiedNetworkTypesChanged(apnTypes, qualifiedNetworkTypes);
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
loge("Failed to call onQualifiedNetworksChanged. " + e);
|
loge("Failed to call onQualifiedNetworksChanged. " + e);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user