Skip to content
Snippets Groups Projects
Commit 22e8c335 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Update connected clients when a downstream disappears."

parents 255565e8 ca071b79
No related branches found
No related tags found
No related merge requests found
......@@ -433,9 +433,7 @@ public class Tethering {
// Called by wifi when the number of soft AP clients changed.
@Override
public void onConnectedClientsChanged(final List<WifiClient> clients) {
if (mConnectedClientsTracker.updateConnectedClients(mForwardedDownstreams, clients)) {
reportTetherClientsChanged(mConnectedClientsTracker.getLastTetheredClients());
}
updateConnectedClients(clients);
}
}
......@@ -1575,6 +1573,7 @@ public class Tethering {
mIPv6TetheringCoordinator.removeActiveDownstream(who);
mOffload.excludeDownstreamInterface(who.interfaceName());
mForwardedDownstreams.remove(who);
updateConnectedClients(null /* wifiClients */);
// If this is a Wi-Fi interface, tell WifiManager of any errors
// or the inactive serving state.
......@@ -2157,6 +2156,12 @@ public class Tethering {
return false;
}
private void updateConnectedClients(final List<WifiClient> wifiClients) {
if (mConnectedClientsTracker.updateConnectedClients(mForwardedDownstreams, wifiClients)) {
reportTetherClientsChanged(mConnectedClientsTracker.getLastTetheredClients());
}
}
private IpServer.Callback makeControlCallback() {
return new IpServer.Callback() {
@Override
......@@ -2171,10 +2176,7 @@ public class Tethering {
@Override
public void dhcpLeasesChanged() {
if (mConnectedClientsTracker.updateConnectedClients(
mForwardedDownstreams, null /* wifiClients */)) {
reportTetherClientsChanged(mConnectedClientsTracker.getLastTetheredClients());
}
updateConnectedClients(null /* wifiClients */);
}
};
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment