Support for hotspot client visibility.

Adding support for visibility into clients that connect to an active hotspot.

Bug: 137309578
Test: Tested manually on a Hawk
Change-Id: Ife4bb5ca7bbcf075683cb0a233f2b5716ccd51d9
This commit is contained in:
James Mattis
2019-10-04 18:26:55 -07:00
parent 8ed2568882
commit b16500d595
2 changed files with 17 additions and 10 deletions

View File

@@ -1,8 +1,11 @@
package com.android.settings.wifi.tether;
import android.net.wifi.WifiClient;
import android.net.wifi.WifiManager;
import android.os.Handler;
import java.util.List;
/**
* Wrapper for {@link android.net.wifi.WifiManager.SoftApCallback} to pass the robo test
*/
@@ -18,8 +21,8 @@ public class WifiTetherSoftApManager {
}
@Override
public void onNumClientsChanged(int numClients) {
mWifiTetherSoftApCallback.onNumClientsChanged(numClients);
public void onConnectedClientsChanged(List<WifiClient> clients) {
mWifiTetherSoftApCallback.onConnectedClientsChanged(clients);
}
};
private Handler mHandler;
@@ -42,6 +45,11 @@ public class WifiTetherSoftApManager {
public interface WifiTetherSoftApCallback {
void onStateChanged(int state, int failureReason);
void onNumClientsChanged(int numClients);
/**
* Called when the connected clients to soft AP changes.
*
* @param clients the currently connected clients
*/
void onConnectedClientsChanged(List<WifiClient> clients);
}
}