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

Commit 0aea9054 authored by Olivier Gaillard's avatar Olivier Gaillard
Browse files

Add the thread id to the Watchdog subjet.

It will help to differentiate threads with non-unique names.

Test: existing unit tests still pass.

Change-Id: Iccd13848b8cc31bfe52d11198c7139cbc9918080
parent 73f1d7b5
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -306,11 +306,13 @@ public class Watchdog implements Dumpable {
        }

        String describeBlockedStateLocked() {
            Thread thread = getThread();
            String threadIdentifier = thread.getName() + ", tid=" + thread.getId();
            if (mCurrentMonitor == null) {
                return "Blocked in handler on " + mName + " (" + getThread().getName() + ")";
                return "Blocked in handler on " + mName + " (" + threadIdentifier + ")";
            } else {
                return "Blocked in monitor " + mCurrentMonitor.getClass().getName()
                        + " on " + mName + " (" + getThread().getName() + ")";
                        + " on " + mName + " (" + threadIdentifier + ")";
            }
        }