Add getAvoidBadWifi system API

This helps remove the dependency on MultinetworkPolicyTracker from
IpClient.

Test: atest FrameworksNetTests NetworkStackTests
Bug: 112869080
Change-Id: If56791dbed564772f25a859f301b8b52d84e38a3
This commit is contained in:
Remi NGUYEN VAN 2019-01-20 20:35:06 +09:00
commit 3436b6ffd9
2 changed files with 23 additions and 0 deletions

View file

@ -3698,6 +3698,19 @@ public class ConnectivityManager {
}
}
/**
* Determine whether the device is configured to avoid bad wifi.
* @hide
*/
@SystemApi
public boolean getAvoidBadWifi() {
try {
return mService.getAvoidBadWifi();
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
/**
* It is acceptable to briefly use multipath data to provide seamless connectivity for
* time-sensitive user-facing operations when the system default network is temporarily

View file

@ -165,6 +165,7 @@ interface IConnectivityManager
void setAvoidUnvalidated(in Network network);
void startCaptivePortalApp(in Network network);
boolean getAvoidBadWifi();
int getMultipathPreference(in Network Network);
NetworkRequest getDefaultRequest();