Merge "Send ConnDiags event before revalidating network in CS." am: ed2ccf0586 am: 078956721a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1350662 Change-Id: Id42979bdb98469f586d97f05ed8ecdc28fbb878f
This commit is contained in:
@@ -4324,9 +4324,11 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
||||
enforceInternetPermission();
|
||||
final int uid = Binder.getCallingUid();
|
||||
final int connectivityInfo = encodeBool(hasConnectivity);
|
||||
mHandler.sendMessage(
|
||||
mHandler.obtainMessage(EVENT_REVALIDATE_NETWORK, uid, connectivityInfo, network));
|
||||
|
||||
// Handle ConnectivityDiagnostics event before attempting to revalidate the network. This
|
||||
// forces an ordering of ConnectivityDiagnostics events in the case where hasConnectivity
|
||||
// does not match the known connectivity of the network - this causes NetworkMonitor to
|
||||
// revalidate the network and generate a ConnectivityDiagnostics ConnectivityReport event.
|
||||
final NetworkAgentInfo nai;
|
||||
if (network == null) {
|
||||
nai = getDefaultNetwork();
|
||||
@@ -4339,6 +4341,9 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
||||
ConnectivityDiagnosticsHandler.EVENT_NETWORK_CONNECTIVITY_REPORTED,
|
||||
connectivityInfo, 0, nai));
|
||||
}
|
||||
|
||||
mHandler.sendMessage(
|
||||
mHandler.obtainMessage(EVENT_REVALIDATE_NETWORK, uid, connectivityInfo, network));
|
||||
}
|
||||
|
||||
private void handleReportNetworkConnectivity(
|
||||
|
||||
Reference in New Issue
Block a user