summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorLorenzo Colitti <lorenzo@google.com>2020-01-13 23:10:04 +0900
committerLorenzo Colitti <lorenzo@google.com>2020-01-13 23:24:02 +0900
commit25f93af88bb47f63014525ed4331e4268f142f6d (patch)
tree0a300927a138dc85c5f43c92aea57a4e6a0b381c /service
parenta2064ac828a788b51452d5d6be2ce49df8202754 (diff)
Stop using NetworkAgentConfig in wifi.
The code default-constructs a NetworkAgentConfig object, but never actually uses it except to pass it to the NetworkAgent constructor. Passing a default-constructed NetworkAgentConfig is equivalent to not specifying any NetworkAgentConfig at all. It results in passing null to ConnectivityService#registerNetworkAgent. This then just calls new NetworkAgentConfig(null), which is equivalent to returning a default-constructed NetworkAgentConfig. Bug: 138306002 Test: builds, boots, wifi works, telephony works Test: atest FrameworksWifiTests Change-Id: I2bcecd366211848a237e7eb467b4f3354fb96457
Diffstat (limited to 'service')
-rw-r--r--service/java/com/android/server/wifi/ClientModeImpl.java10
1 files changed, 3 insertions, 7 deletions
diff --git a/service/java/com/android/server/wifi/ClientModeImpl.java b/service/java/com/android/server/wifi/ClientModeImpl.java
index ecbc8dfdb..259ec2fe1 100644
--- a/service/java/com/android/server/wifi/ClientModeImpl.java
+++ b/service/java/com/android/server/wifi/ClientModeImpl.java
@@ -47,7 +47,6 @@ import android.net.MatchAllNetworkSpecifier;
import android.net.NattKeepalivePacketData;
import android.net.Network;
import android.net.NetworkAgent;
-import android.net.NetworkAgentConfig;
import android.net.NetworkCapabilities;
import android.net.NetworkInfo;
import android.net.NetworkInfo.DetailedState;
@@ -430,9 +429,6 @@ public class ClientModeImpl extends StateMachine {
// Used to filter out requests we couldn't possibly satisfy.
private final NetworkCapabilities mNetworkCapabilitiesFilter = new NetworkCapabilities();
- // Provide packet filter capabilities to ConnectivityService.
- private final NetworkAgentConfig mNetworkAgentConfig = new NetworkAgentConfig();
-
private final ExternalCallbackTracker<IActionListener> mProcessingActionListeners;
private final ExternalCallbackTracker<ITxPacketCountListener> mProcessingTxPacketCountListeners;
@@ -4183,8 +4179,8 @@ public class ClientModeImpl extends StateMachine {
private class WifiNetworkAgent extends NetworkAgent {
WifiNetworkAgent(Looper l, Context c, String tag, NetworkInfo ni,
- NetworkCapabilities nc, LinkProperties lp, int score, NetworkAgentConfig config) {
- super(l, c, tag, ni, nc, lp, score, config);
+ NetworkCapabilities nc, LinkProperties lp, int score) {
+ super(l, c, tag, ni, nc, lp, score);
}
private int mLastNetworkStatus = -1; // To detect when the status really changes
@@ -4336,7 +4332,7 @@ public class ClientModeImpl extends StateMachine {
final NetworkCapabilities nc = getCapabilities(getCurrentWifiConfiguration());
synchronized (mNetworkAgentLock) {
mNetworkAgent = new WifiNetworkAgent(getHandler().getLooper(), mContext,
- "WifiNetworkAgent", mNetworkInfo, nc, mLinkProperties, 60, mNetworkAgentConfig);
+ "WifiNetworkAgent", mNetworkInfo, nc, mLinkProperties, 60);
}
// We must clear the config BSSID, as the wifi chipset may decide to roam