UpstreamNetworkMonitor: remove unused mTetheringUpstreamNetwork
The variable mTetheringUpstreamNetwork is unused.
Remove the dead variable and its related setter setCurrentUpstream().
History:
aosp/507635: add mTetheringUpstreamNetwork
aosp/1183410: some functions stop using mTetheringUpstreamNetwork
aosp/1203243: stop using mTetheringUpstreamNetwork completely
Bug: 243516306
Test: atest TetheringTest
Change-Id: I07784c47e49dd9ef034f91bef9089ca48c187f30
diff --git a/Tethering/src/com/android/networkstack/tethering/Tethering.java b/Tethering/src/com/android/networkstack/tethering/Tethering.java
index e48019c..b4e5781 100644
--- a/Tethering/src/com/android/networkstack/tethering/Tethering.java
+++ b/Tethering/src/com/android/networkstack/tethering/Tethering.java
@@ -1856,7 +1856,6 @@
final Network newUpstream = (ns != null) ? ns.network : null;
if (mTetherUpstream != newUpstream) {
mTetherUpstream = newUpstream;
- mUpstreamNetworkMonitor.setCurrentUpstream(mTetherUpstream);
reportUpstreamChanged(ns);
}
}
diff --git a/Tethering/src/com/android/networkstack/tethering/UpstreamNetworkMonitor.java b/Tethering/src/com/android/networkstack/tethering/UpstreamNetworkMonitor.java
index 16c031b..ac2aa7b 100644
--- a/Tethering/src/com/android/networkstack/tethering/UpstreamNetworkMonitor.java
+++ b/Tethering/src/com/android/networkstack/tethering/UpstreamNetworkMonitor.java
@@ -133,8 +133,6 @@
private boolean mIsDefaultCellularUpstream;
// The current system default network (not really used yet).
private Network mDefaultInternetNetwork;
- // The current upstream network used for tethering.
- private Network mTetheringUpstreamNetwork;
private boolean mPreferTestNetworks;
public UpstreamNetworkMonitor(Context ctx, StateMachine tgt, SharedLog log, int what) {
@@ -191,7 +189,6 @@
releaseCallback(mListenAllCallback);
mListenAllCallback = null;
- mTetheringUpstreamNetwork = null;
mNetworkMap.clear();
}
@@ -342,11 +339,6 @@
return findFirstDunNetwork(mNetworkMap.values());
}
- /** Tell UpstreamNetworkMonitor which network is the current upstream of tethering. */
- public void setCurrentUpstream(Network upstream) {
- mTetheringUpstreamNetwork = upstream;
- }
-
/** Return local prefixes. */
public Set<IpPrefix> getLocalPrefixes() {
return (Set<IpPrefix>) mLocalPrefixes.clone();