Merge "Add API for NetworkStack to start captive portal"
This commit is contained in:
commit
9d0e114e66
2 changed files with 40 additions and 0 deletions
|
|
@ -3906,6 +3906,25 @@ public class ConnectivityManager {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Requests that the system open the captive portal app with the specified extras.
|
||||
*
|
||||
* <p>This endpoint is exclusively for use by the NetworkStack and is protected by the
|
||||
* corresponding permission.
|
||||
* @param appExtras Extras to include in the app start intent.
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
@TestApi
|
||||
@RequiresPermission(NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK)
|
||||
public void startCaptivePortalApp(Bundle appExtras) {
|
||||
try {
|
||||
mService.startCaptivePortalAppInternal(appExtras);
|
||||
} catch (RemoteException e) {
|
||||
throw e.rethrowFromSystemServer();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether the device is configured to avoid bad wifi.
|
||||
* @hide
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ import android.net.NetworkQuotaInfo;
|
|||
import android.net.NetworkRequest;
|
||||
import android.net.NetworkState;
|
||||
import android.net.ProxyInfo;
|
||||
import android.os.Bundle;
|
||||
import android.os.IBinder;
|
||||
import android.os.Messenger;
|
||||
import android.os.ParcelFileDescriptor;
|
||||
|
|
@ -167,6 +168,7 @@ interface IConnectivityManager
|
|||
void setAcceptUnvalidated(in Network network, boolean accept, boolean always);
|
||||
void setAvoidUnvalidated(in Network network);
|
||||
void startCaptivePortalApp(in Network network);
|
||||
void startCaptivePortalAppInternal(in Bundle appExtras);
|
||||
|
||||
boolean getAvoidBadWifi();
|
||||
int getMultipathPreference(in Network Network);
|
||||
|
|
|
|||
Loading…
Reference in a new issue