Merge "Add more logging when view methods are called from the wrong thread" into tm-qpr-dev am: 7f20b9db07
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/21553701 Change-Id: I3bd5eeed6268b68b8c970bf31617b34b05e0f4c5 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -9885,9 +9885,12 @@ public final class ViewRootImpl implements ViewParent,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void checkThread() {
|
void checkThread() {
|
||||||
if (mThread != Thread.currentThread()) {
|
Thread current = Thread.currentThread();
|
||||||
|
if (mThread != current) {
|
||||||
throw new CalledFromWrongThreadException(
|
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());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user