diff --git a/ReactAndroid/src/main/java/com/facebook/react/bridge/queue/MessageQueueThread.java b/ReactAndroid/src/main/java/com/facebook/react/bridge/queue/MessageQueueThread.java index 9829ddfc5..84cc9accb 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/bridge/queue/MessageQueueThread.java +++ b/ReactAndroid/src/main/java/com/facebook/react/bridge/queue/MessageQueueThread.java @@ -36,12 +36,14 @@ public interface MessageQueueThread { /** * @return whether the current Thread is also the Thread associated with this MessageQueueThread. */ + @DoNotStrip boolean isOnThread(); /** * Asserts {@link #isOnThread()}, throwing a {@link AssertionException} (NOT an * {@link AssertionError}) if the assertion fails. */ + @DoNotStrip void assertIsOnThread(); /** @@ -49,5 +51,6 @@ public interface MessageQueueThread { * thing the thread runs. If called from a separate thread, this will block until the thread can * be quit and joined. */ + @DoNotStrip void quitSynchronous(); } diff --git a/ReactAndroid/src/main/java/com/facebook/react/bridge/queue/MessageQueueThreadImpl.java b/ReactAndroid/src/main/java/com/facebook/react/bridge/queue/MessageQueueThreadImpl.java index f4377f4fe..5593cb02f 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/bridge/queue/MessageQueueThreadImpl.java +++ b/ReactAndroid/src/main/java/com/facebook/react/bridge/queue/MessageQueueThreadImpl.java @@ -82,6 +82,7 @@ public class MessageQueueThreadImpl implements MessageQueueThread { /** * @return whether the current Thread is also the Thread associated with this MessageQueueThread. */ + @DoNotStrip @Override public boolean isOnThread() { return mLooper.getThread() == Thread.currentThread(); @@ -91,6 +92,7 @@ public class MessageQueueThreadImpl implements MessageQueueThread { * Asserts {@link #isOnThread()}, throwing a {@link AssertionException} (NOT an * {@link AssertionError}) if the assertion fails. */ + @DoNotStrip @Override public void assertIsOnThread() { SoftAssertions.assertCondition(isOnThread(), mAssertionErrorMessage); @@ -100,6 +102,7 @@ public class MessageQueueThreadImpl implements MessageQueueThread { * Quits this queue's Looper. If that Looper was running on a different Thread than the current * Thread, also waits for the last message being processed to finish and the Thread to die. */ + @DoNotStrip @Override public void quitSynchronous() { mIsFinished = true;