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

Commit 90305cc7 authored by Brad Lassey's avatar Brad Lassey
Browse files

Override toString() in PollingFrame

Bug: b/326077653
Test: tested with a test app
Change-Id: I0b29882d90c1bfbe10fcd3d88111d163dc8ba5a9
parent 6075bd28
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@ import android.os.Parcelable;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.HexFormat;
import java.util.List;

/**
@@ -231,4 +232,12 @@ public final class PollingFrame implements Parcelable{
        frame.putInt(KEY_POLLING_LOOP_TIMESTAMP, getTimestamp());
        return frame;
    }

    @Override
    public String toString() {
        return "PollingFrame { Type: " + (char) getType()
                + ", gain: " + getGain()
                + ", timestamp: " + Integer.toUnsignedString(getTimestamp())
                + ", data: [" + HexFormat.ofDelimiter(" ").formatHex(getData()) + "] }";
    }
}