Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dea9593d authored by Mingguang Xu's avatar Mingguang Xu
Browse files

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: default avatarMingguang Xu <mingguangxu@google.com>
(cherry picked from commit 705d110d)
parent 27f83cdb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -7528,7 +7528,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);
  }
+2 −4
Original line number Diff line number Diff line
@@ -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);
}
+4 −6
Original line number Diff line number Diff line
@@ -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;
@@ -5986,11 +5985,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}.
@@ -6016,7 +6014,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) {