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

Commit 05a47d16 authored by Kean Mariotti's avatar Kean Mariotti Committed by Android (Google) Code Review
Browse files

Merge "Fix UI traces real-to-elapsed time offset"

parents acf5ee3d 2b1b7d71
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -138,7 +138,7 @@ class ImeTracingServerImpl extends ImeTracing {
    private void writeTracesToFilesLocked() {
        try {
            long timeOffsetNs =
                    TimeUnit.NANOSECONDS.convert(System.currentTimeMillis(), TimeUnit.NANOSECONDS)
                    TimeUnit.MILLISECONDS.toNanos(System.currentTimeMillis())
                    - SystemClock.elapsedRealtimeNanos();

            ProtoOutputStream clientsProto = new ProtoOutputStream();
+1 −2
Original line number Diff line number Diff line
@@ -2225,8 +2225,7 @@ final class AccessibilityController {
                ProtoOutputStream proto = new ProtoOutputStream();
                proto.write(MAGIC_NUMBER, MAGIC_NUMBER_VALUE);
                long timeOffsetNs =
                        TimeUnit.NANOSECONDS.convert(System.currentTimeMillis(),
                                                     TimeUnit.NANOSECONDS)
                        TimeUnit.MILLISECONDS.toNanos(System.currentTimeMillis())
                        - SystemClock.elapsedRealtimeNanos();
                proto.write(REAL_TO_ELAPSED_TIME_OFFSET_NANOS, timeOffsetNs);
                mBuffer.writeTraceToFile(mTraceFile, proto);
+1 −1
Original line number Diff line number Diff line
@@ -355,7 +355,7 @@ class WindowTracing {
            ProtoOutputStream proto = new ProtoOutputStream();
            proto.write(MAGIC_NUMBER, MAGIC_NUMBER_VALUE);
            long timeOffsetNs =
                    TimeUnit.NANOSECONDS.convert(System.currentTimeMillis(), TimeUnit.NANOSECONDS)
                    TimeUnit.MILLISECONDS.toNanos(System.currentTimeMillis())
                    - SystemClock.elapsedRealtimeNanos();
            proto.write(REAL_TO_ELAPSED_TIME_OFFSET_NANOS, timeOffsetNs);
            mBuffer.writeTraceToFile(mTraceFile, proto);