Support "don't ask again" in the avoid bad wifi dialog.
am: c65750c8a0
Change-Id: Ic6a1917a83e2d847bd673790e2c36f7316ca7acd
This commit is contained in:
commit
74cb76ff80
2 changed files with 174 additions and 23 deletions
|
|
@ -3197,6 +3197,27 @@ public class ConnectivityManager {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Informs the system to penalize {@code network}'s score when it becomes unvalidated. This is
|
||||
* only meaningful if the system is configured not to penalize such networks, e.g., if the
|
||||
* {@code config_networkAvoidBadWifi} configuration variable is set to 0 and the {@code
|
||||
* NETWORK_AVOID_BAD_WIFI setting is unset}.
|
||||
*
|
||||
* <p>This method requires the caller to hold the permission
|
||||
* {@link android.Manifest.permission#CONNECTIVITY_INTERNAL}
|
||||
*
|
||||
* @param network The network to accept.
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
public void setAvoidUnvalidated(Network network) {
|
||||
try {
|
||||
mService.setAvoidUnvalidated(network);
|
||||
} catch (RemoteException e) {
|
||||
throw e.rethrowFromSystemServer();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Resets all connectivity manager settings back to factory defaults.
|
||||
* @hide
|
||||
|
|
|
|||
|
|
@ -161,6 +161,7 @@ interface IConnectivityManager
|
|||
void releaseNetworkRequest(in NetworkRequest networkRequest);
|
||||
|
||||
void setAcceptUnvalidated(in Network network, boolean accept, boolean always);
|
||||
void setAvoidUnvalidated(in Network network);
|
||||
|
||||
int getRestoreDefaultNetworkDelay(int networkType);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue