Remove NetworkMonitor dependency on ICaptivePortal
ICaptivePortal is used in the framework and cannot be used as a dependency in NetworkMonitor, as the framework class takes precedence when linking. Also fix NetworkMonitorTest that was not verifying the right startCaptivePortalApp call. Test: atest FrameworksNetTests NetworkStackTests Bug: 124033493 Change-Id: I8e7bb79e50650ae182a2e4277fb49abf5fb6d910 Merged-In: Ib6a89e54312628662b130fbeec18d11e139f09fa
This commit is contained in:
@@ -3911,15 +3911,16 @@ public class ConnectivityManager {
|
||||
*
|
||||
* <p>This endpoint is exclusively for use by the NetworkStack and is protected by the
|
||||
* corresponding permission.
|
||||
* @param network Network on which the captive portal was detected.
|
||||
* @param appExtras Extras to include in the app start intent.
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
@TestApi
|
||||
@RequiresPermission(NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK)
|
||||
public void startCaptivePortalApp(Bundle appExtras) {
|
||||
public void startCaptivePortalApp(Network network, Bundle appExtras) {
|
||||
try {
|
||||
mService.startCaptivePortalAppInternal(appExtras);
|
||||
mService.startCaptivePortalAppInternal(network, appExtras);
|
||||
} catch (RemoteException e) {
|
||||
throw e.rethrowFromSystemServer();
|
||||
}
|
||||
|
||||
@@ -168,7 +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);
|
||||
void startCaptivePortalAppInternal(in Network network, in Bundle appExtras);
|
||||
|
||||
boolean getAvoidBadWifi();
|
||||
int getMultipathPreference(in Network Network);
|
||||
|
||||
@@ -34,6 +34,7 @@ oneway interface INetworkMonitor {
|
||||
|
||||
void start();
|
||||
void launchCaptivePortalApp();
|
||||
void notifyCaptivePortalAppFinished(int response);
|
||||
void forceReevaluation(int uid);
|
||||
void notifyPrivateDnsChanged(in PrivateDnsConfigParcel config);
|
||||
void notifyDnsResponse(int returnCode);
|
||||
|
||||
@@ -26,5 +26,4 @@ oneway interface INetworkMonitorCallbacks {
|
||||
void notifyPrivateDnsConfigResolved(in PrivateDnsConfigParcel config);
|
||||
void showProvisioningNotification(String action, String packageName);
|
||||
void hideProvisioningNotification();
|
||||
void logCaptivePortalLoginEvent(int eventId, String packageName);
|
||||
}
|
||||
Reference in New Issue
Block a user