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

Commit e896ee91 authored by Winson Chung's avatar Winson Chung
Browse files

Add more logging when view methods are called from the wrong thread

Bug: 270446029
Test: Just extending the logging
Change-Id: I7212ca245dad6c77a51797f07e1587edbf6af475
parent c3a40b49
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -9883,9 +9883,12 @@ public final class ViewRootImpl implements ViewParent,
    }

    void checkThread() {
        if (mThread != Thread.currentThread()) {
        Thread current = Thread.currentThread();
        if (mThread != current) {
            throw new CalledFromWrongThreadException(
                    "Only the original thread that created a view hierarchy can touch its views.");
                    "Only the original thread that created a view hierarchy can touch its views."
                            + " Expected: " + mThread.getName()
                            + " Calling: " + current.getName());
        }
    }