IP connectivity metrics: fix LINGER/UNLINGER logging
This patch fixes a regression introduced by commitd5c11bbb65for logging NetworkEvents when lingering and unlingering a network. Commitd5c11bbb65removed an overloaded constructor for the NetworkEvent class, which caused NetworkEvents with event type of LINGER or UNLINGER logged in ConnectivityService to have incorrect event types (set to the network id instead) and incorrect duration (set as the event type instead). Bug: 34901696 Test: runtest frameworks-net Change-Id: Iab97a58ca805413617c8e8b4553404625a820ceb
This commit is contained in:
parent
a37e03886f
commit
2efffd7c77
1 changed files with 2 additions and 1 deletions
|
|
@ -5605,7 +5605,8 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
|||
}
|
||||
|
||||
private void logNetworkEvent(NetworkAgentInfo nai, int evtype) {
|
||||
mMetricsLog.log(new NetworkEvent(nai.network.netId, evtype));
|
||||
int[] transports = nai.networkCapabilities.getTransportTypes();
|
||||
mMetricsLog.log(nai.network.netId, transports, new NetworkEvent(evtype));
|
||||
}
|
||||
|
||||
private static boolean toBool(int encodedBoolean) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue