From 450c39ed575b8c2c47fb17cf32b24524324657e0 Mon Sep 17 00:00:00 2001 From: Eric House Date: Sun, 9 Dec 2018 17:11:38 -0800 Subject: [PATCH] new DebugUtils method --- .../src/main/java/org/eehouse/android/xw4/DbgUtils.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/DbgUtils.java b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/DbgUtils.java index e1b6f86c1..67d237f6a 100644 --- a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/DbgUtils.java +++ b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/DbgUtils.java @@ -101,7 +101,12 @@ public class DbgUtils { public static void assertOnUIThread() { - Assert.assertTrue( Utils.isOnUIThread() ); + assertOnUIThread( true ); + } + + public static void assertOnUIThread( boolean isOnThread ) + { + Assert.assertTrue( isOnThread == Utils.isOnUIThread() ); } public static void printStack( String tag, StackTraceElement[] trace )