Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c6dc6baf authored by Hugo Benichi's avatar Hugo Benichi Committed by android-build-merger
Browse files

Merge "Light refactors to packet wakeup events."

am: e887e2b9

Change-Id: I40f637114cbfc04bce4058af0a1f43f38bd461db
parents 2a82aa70 e887e2b9
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@ public class WakeupEvent {
    public String iface;
    public int uid;
    public int ethertype;
    public byte[] dstHwAddr;
    public MacAddress dstHwAddr;
    public String srcIp;
    public String dstIp;
    public int ipNextHeader;
@@ -44,7 +44,7 @@ public class WakeupEvent {
        j.add(iface);
        j.add("uid: " + Integer.toString(uid));
        j.add("eth=0x" + Integer.toHexString(ethertype));
        j.add("dstHw=" + MacAddress.stringAddrFromByteAddr(dstHwAddr));
        j.add("dstHw=" + dstHwAddr);
        if (ipNextHeader > 0) {
            j.add("ipNxtHdr=" + ipNextHeader);
            j.add("srcIp=" + srcIp);
+1 −2
Original line number Diff line number Diff line
@@ -16,7 +16,6 @@

package android.net.metrics;

import android.net.MacAddress;
import android.os.Process;
import android.os.SystemClock;
import android.util.SparseIntArray;
@@ -80,7 +79,7 @@ public class WakeupStats {
                break;
        }

        switch (MacAddress.macAddressType(ev.dstHwAddr)) {
        switch (ev.dstHwAddr.addressType()) {
            case UNICAST:
                l2UnicastCount++;
                break;
+2 −1
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ import static android.util.TimeUtils.NANOS_PER_MS;
import android.content.Context;
import android.net.ConnectivityManager;
import android.net.INetdEventCallback;
import android.net.MacAddress;
import android.net.Network;
import android.net.NetworkCapabilities;
import android.net.metrics.ConnectStats;
@@ -242,7 +243,7 @@ public class NetdEventListenerService extends INetdEventListener.Stub {
        event.timestampMs = timestampMs;
        event.uid = uid;
        event.ethertype = ethertype;
        event.dstHwAddr = dstHw;
        event.dstHwAddr = new MacAddress(dstHw);
        event.srcIp = srcIp;
        event.dstIp = dstIp;
        event.ipNextHeader = ipNextHeader;