diff options
| author | Jack Yu <jackyu@google.com> | 2018-11-02 11:34:55 -0700 |
|---|---|---|
| committer | Jack Yu <jackyu@google.com> | 2018-11-02 11:34:55 -0700 |
| commit | 390edbd3d2e59d9936ef324efc101dcd40e2e00a (patch) | |
| tree | b10a43ae6080e88153b05bbfccd28e580db0a53d | |
| parent | b23fc3c2cd4f03a312fd0fd1fe5472a6b27f920f (diff) | |
Changed the onQualifiedNetworkTypesChanged API
Changed the first parameter from apnType to apnTypes so the
caller can update multiple APN types in one single call. This is
useful because in some cases one single APN setting can serve
multiple APN types.
Test: Manual
Bug: 73659459
Change-Id: Ie3274c76b42a67d2f41b41195a240052c2096f9f
| -rw-r--r-- | telephony/java/android/telephony/data/IQualifiedNetworksServiceCallback.aidl | 2 | ||||
| -rw-r--r-- | telephony/java/android/telephony/data/QualifiedNetworksService.java | 15 |
2 files changed, 9 insertions, 8 deletions
diff --git a/telephony/java/android/telephony/data/IQualifiedNetworksServiceCallback.aidl b/telephony/java/android/telephony/data/IQualifiedNetworksServiceCallback.aidl index e8e1f017789f..32ffdbc2121c 100644 --- a/telephony/java/android/telephony/data/IQualifiedNetworksServiceCallback.aidl +++ b/telephony/java/android/telephony/data/IQualifiedNetworksServiceCallback.aidl @@ -22,5 +22,5 @@ package android.telephony.data; */ oneway interface IQualifiedNetworksServiceCallback { - void onQualifiedNetworkTypesChanged(int apnType, in int[] qualifiedNetworkTypesList); + void onQualifiedNetworkTypesChanged(int apnTypes, in int[] qualifiedNetworkTypes); } diff --git a/telephony/java/android/telephony/data/QualifiedNetworksService.java b/telephony/java/android/telephony/data/QualifiedNetworksService.java index bb89f193e03a..57d9cced53b1 100644 --- a/telephony/java/android/telephony/data/QualifiedNetworksService.java +++ b/telephony/java/android/telephony/data/QualifiedNetworksService.java @@ -121,27 +121,28 @@ public abstract class QualifiedNetworksService extends Service { /** * 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 - * 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. * - * @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 * 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 * for data setup. */ - public final void updateQualifiedNetworkTypes(@ApnType int apnType, + public final void updateQualifiedNetworkTypes(@ApnType int apnTypes, int[] qualifiedNetworkTypes) { - mHandler.obtainMessage(QNS_UPDATE_QUALIFIED_NETWORKS, mSlotIndex, apnType, + mHandler.obtainMessage(QNS_UPDATE_QUALIFIED_NETWORKS, mSlotIndex, apnTypes, qualifiedNetworkTypes).sendToTarget(); } - private void onUpdateQualifiedNetworkTypes(@ApnType int apnType, + private void onUpdateQualifiedNetworkTypes(@ApnType int apnTypes, int[] qualifiedNetworkTypes) { - mQualifiedNetworkTypesList.put(apnType, qualifiedNetworkTypes); + mQualifiedNetworkTypesList.put(apnTypes, qualifiedNetworkTypes); if (mCallback != null) { try { - mCallback.onQualifiedNetworkTypesChanged(apnType, qualifiedNetworkTypes); + mCallback.onQualifiedNetworkTypesChanged(apnTypes, qualifiedNetworkTypes); } catch (RemoteException e) { loge("Failed to call onQualifiedNetworksChanged. " + e); } |
