Add prompt to sign in at captive portal to Wi-Fi Slice
- Support signing in captive portal APs in WifiSlice
- Show ContextualWifiSlice when signing in is required
- Generifies SliceBackgroundWorker.getInstance() to return <T extends SliceBackgroundWorker>
Fixes: 128056349
Test: make RunSettingsRoboTests -j
Change-Id: Ib4d3942591a65e81018389e4c0bbddfea6854dbc
(cherry picked from commit dd9f92280b
)
This commit is contained in:
committed by
Tsung-Mao Fang
parent
44427259e8
commit
8f6c06974c
@@ -57,7 +57,7 @@ public class ContextualWifiSlice extends WifiSlice {
|
||||
sActiveUiSession = currentUiSession;
|
||||
sPreviouslyDisplayed = false;
|
||||
}
|
||||
if (!sPreviouslyDisplayed && !TextUtils.equals(getActiveSSID(), WifiSsid.NONE)) {
|
||||
if (!sPreviouslyDisplayed && hasWorkingNetwork()) {
|
||||
Log.d(TAG, "Wifi is connected, no point showing any suggestion.");
|
||||
return null;
|
||||
}
|
||||
@@ -67,4 +67,8 @@ public class ContextualWifiSlice extends WifiSlice {
|
||||
|
||||
return super.getSlice();
|
||||
}
|
||||
|
||||
private boolean hasWorkingNetwork() {
|
||||
return !TextUtils.equals(getActiveSSID(), WifiSsid.NONE) && !isCaptivePortal();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user