summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Winson Chung <winsonc@google.com> 2023-02-27 18:39:50 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2023-02-27 18:39:50 +0000
commit7f20b9db074b76c511d9d62a0dbc90efc02bbde6 (patch)
tree1d45b08834d439b179f8db3fe449c857ef165666
parentfc2551e544ed6699c0c39cc8d9575a30a3b9d3a0 (diff)
parente896ee918a8b2817d706ef5479415170e420c27a (diff)
Merge "Add more logging when view methods are called from the wrong thread" into tm-qpr-dev
-rw-r--r--core/java/android/view/ViewRootImpl.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java
index 953f17a3a827..f9e84114a7da 100644
--- a/core/java/android/view/ViewRootImpl.java
+++ b/core/java/android/view/ViewRootImpl.java
@@ -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());
}
}