Merge changes from topic 'wifi-alternate-reality'
* changes: Pin a process to wifi when it calls enableNetwork(..., true) Make CALLBACK_PRECHECK actually work.
This commit is contained in:
committed by
Android (Google) Code Review
commit
87a81fd19f
@@ -4255,9 +4255,10 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
|||||||
networkAgent.created = true;
|
networkAgent.created = true;
|
||||||
updateLinkProperties(networkAgent, null);
|
updateLinkProperties(networkAgent, null);
|
||||||
notifyIfacesChanged();
|
notifyIfacesChanged();
|
||||||
notifyNetworkCallbacks(networkAgent, ConnectivityManager.CALLBACK_PRECHECK);
|
|
||||||
networkAgent.networkMonitor.sendMessage(NetworkMonitor.CMD_NETWORK_CONNECTED);
|
networkAgent.networkMonitor.sendMessage(NetworkMonitor.CMD_NETWORK_CONNECTED);
|
||||||
scheduleUnvalidatedPrompt(networkAgent);
|
scheduleUnvalidatedPrompt(networkAgent);
|
||||||
|
|
||||||
if (networkAgent.isVPN()) {
|
if (networkAgent.isVPN()) {
|
||||||
// Temporarily disable the default proxy (not global).
|
// Temporarily disable the default proxy (not global).
|
||||||
synchronized (mProxyLock) {
|
synchronized (mProxyLock) {
|
||||||
@@ -4270,9 +4271,13 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
|||||||
}
|
}
|
||||||
// TODO: support proxy per network.
|
// TODO: support proxy per network.
|
||||||
}
|
}
|
||||||
|
|
||||||
// Consider network even though it is not yet validated.
|
// Consider network even though it is not yet validated.
|
||||||
rematchNetworkAndRequests(networkAgent, NascentState.NOT_JUST_VALIDATED,
|
rematchNetworkAndRequests(networkAgent, NascentState.NOT_JUST_VALIDATED,
|
||||||
ReapUnvalidatedNetworks.REAP);
|
ReapUnvalidatedNetworks.REAP);
|
||||||
|
|
||||||
|
// This has to happen after matching the requests, because callbacks are just requests.
|
||||||
|
notifyNetworkCallbacks(networkAgent, ConnectivityManager.CALLBACK_PRECHECK);
|
||||||
} else if (state == NetworkInfo.State.DISCONNECTED ||
|
} else if (state == NetworkInfo.State.DISCONNECTED ||
|
||||||
state == NetworkInfo.State.SUSPENDED) {
|
state == NetworkInfo.State.SUSPENDED) {
|
||||||
networkAgent.asyncChannel.disconnect();
|
networkAgent.asyncChannel.disconnect();
|
||||||
|
|||||||
Reference in New Issue
Block a user