Add a "sign into network" button to the wifi details page.
Bug: 36203355 Test: manually signed into captive portal Test: make -j64 RunSettingsRoboTests Change-Id: I3242ef30125ddfdaaac9b80ead4f8ac14ea6d364
This commit is contained in:
@@ -16,6 +16,11 @@
|
||||
|
||||
package com.android.settings.vpn2;
|
||||
|
||||
import android.net.ConnectivityManager;
|
||||
import android.net.ConnectivityManager.NetworkCallback;
|
||||
import android.net.Network;
|
||||
import android.net.NetworkRequest;
|
||||
import android.os.Handler;
|
||||
import android.net.ProxyInfo;
|
||||
|
||||
/**
|
||||
@@ -26,6 +31,11 @@ import android.net.ProxyInfo;
|
||||
*/
|
||||
public interface ConnectivityManagerWrapper {
|
||||
|
||||
/**
|
||||
* Returns the real ConnectivityManager object wrapped by this wrapper.
|
||||
*/
|
||||
public ConnectivityManager getConnectivityManager();
|
||||
|
||||
/**
|
||||
* Calls {@code ConnectivityManager.getAlwaysOnVpnPackageForUser()}.
|
||||
*
|
||||
@@ -39,4 +49,27 @@ public interface ConnectivityManagerWrapper {
|
||||
* @see android.net.ConnectivityManager#getGlobalProxy
|
||||
*/
|
||||
ProxyInfo getGlobalProxy();
|
||||
|
||||
/**
|
||||
* Calls {@code ConnectivityManager.registerNetworkCallback()}.
|
||||
*
|
||||
* This is part of the ConnectivityManager public API in SDK 26 or above, but is not yet visible
|
||||
* to the robolectric tests, which currently build with SDK 23.
|
||||
* TODO: delete this once the robolectric tests build with SDK 26 or above.
|
||||
*
|
||||
* @see android.net.ConnectivityManager#registerNetworkCallback(NetworkRequest,NetworkCallback,Handler)
|
||||
*/
|
||||
public void registerNetworkCallback(NetworkRequest request, NetworkCallback callback,
|
||||
Handler handler);
|
||||
|
||||
/**
|
||||
* Calls {@code ConnectivityManager.startCaptivePortalApp()}.
|
||||
*
|
||||
* This is part of the ConnectivityManager public API in SDK 26 or above, but is not yet visible
|
||||
* to the robolectric tests, which currently build with SDK 23.
|
||||
* TODO: delete this once the robolectric tests build with SDK 26 or above.
|
||||
*
|
||||
* @see android.net.ConnectivityManager#startCaptivePortalApp(Network)
|
||||
*/
|
||||
public void startCaptivePortalApp(Network network);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user