Automatically direct the user to the captive portal in Wi-Fi Slice
Save the SSID when the user clicks the network, and then automatically start login page when the network gets the captive portal capability. Fixes: 128056349 Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.wifi Change-Id: Ia25241a8243d7d6aae604f341b512350404d9fd1
This commit is contained in:
@@ -43,17 +43,21 @@ public class ConnectToWifiHandler extends Activity {
|
||||
WifiDialogActivity.KEY_ACCESS_POINT_STATE);
|
||||
|
||||
if (network != null) {
|
||||
WifiScanWorker.clearClickedWifi();
|
||||
final ConnectivityManager cm = getSystemService(ConnectivityManager.class);
|
||||
// start captive portal app to sign in to network
|
||||
cm.startCaptivePortalApp(network);
|
||||
} else if (accessPointState != null) {
|
||||
connect(new AccessPoint(this, accessPointState));
|
||||
}
|
||||
|
||||
finish();
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
void connect(AccessPoint accessPoint) {
|
||||
WifiScanWorker.saveClickedWifi(accessPoint);
|
||||
|
||||
final WifiConnectListener connectListener = new WifiConnectListener(this);
|
||||
switch (WifiUtils.getConnectingType(accessPoint)) {
|
||||
case WifiUtils.CONNECT_TYPE_OSU_PROVISION:
|
||||
|
||||
Reference in New Issue
Block a user