Extension API: Replace NetworkScore object with integer in API surface
NetworkScore object is removed as part of punting the network selection refoundation feature out of Android 11. Test: atest android.net.wifi Bug: 135573686, 122133502, 136312816, 135572156 Change-Id: Ib4226a4d66ab29fc4b31226d5ece8ad14a14d1e1 Signed-off-by: Mingguang Xu <mingguangxu@google.com>
This commit is contained in:
@@ -7527,7 +7527,7 @@ package android.net.wifi {
|
||||
}
|
||||
|
||||
public static interface WifiManager.ScoreChangeCallback {
|
||||
method public void onScoreChange(int, @NonNull android.net.NetworkScore);
|
||||
method public void onScoreChange(int, int);
|
||||
method public void onTriggerUpdateOfWifiUsabilityStats(int);
|
||||
}
|
||||
|
||||
|
||||
@@ -16,16 +16,14 @@
|
||||
|
||||
package android.net.wifi;
|
||||
|
||||
import android.net.NetworkScore;
|
||||
|
||||
/**
|
||||
* Interface for Wi-Fi network score callback.
|
||||
* Interface for Wi-Fi score callback.
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
oneway interface IScoreChangeCallback
|
||||
{
|
||||
void onScoreChange(int sessionId, in NetworkScore score);
|
||||
void onScoreChange(int sessionId, int score);
|
||||
|
||||
void onTriggerUpdateOfWifiUsabilityStats(int sessionId);
|
||||
}
|
||||
|
||||
@@ -39,7 +39,6 @@ import android.net.ConnectivityManager;
|
||||
import android.net.DhcpInfo;
|
||||
import android.net.MacAddress;
|
||||
import android.net.Network;
|
||||
import android.net.NetworkScore;
|
||||
import android.net.NetworkStack;
|
||||
import android.net.wifi.hotspot2.IProvisioningCallback;
|
||||
import android.net.wifi.hotspot2.OsuProvider;
|
||||
@@ -5980,11 +5979,10 @@ public class WifiManager {
|
||||
*
|
||||
* @param sessionId The ID to indicate current Wi-Fi network connection obtained from
|
||||
* {@link WifiConnectedNetworkScorer#start(int)}.
|
||||
* @param score The {@link android.net.NetworkScore} object representing the
|
||||
* characteristics of current Wi-Fi network. Populated by connected network
|
||||
* scorer in applications.
|
||||
* @param score The score representing link quality of current Wi-Fi network connection.
|
||||
* Populated by connected network scorer in applications..
|
||||
*/
|
||||
void onScoreChange(int sessionId, @NonNull NetworkScore score);
|
||||
void onScoreChange(int sessionId, int score);
|
||||
|
||||
/**
|
||||
* Called by applications to trigger an update of {@link WifiUsabilityStatsEntry}.
|
||||
@@ -6010,7 +6008,7 @@ public class WifiManager {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onScoreChange(int sessionId, @NonNull NetworkScore score) {
|
||||
public void onScoreChange(int sessionId, int score) {
|
||||
try {
|
||||
mScoreChangeCallback.onScoreChange(sessionId, score);
|
||||
} catch (RemoteException e) {
|
||||
|
||||
Reference in New Issue
Block a user