Fix instacrash on login in rnfeed

Summary:build-break

Proguard was renaming MessageQueueThread interface methods that we reference from c++.

Differential Revision: D2960332

fb-gh-sync-id: 572dcd8a64e774f65c5abfb8cdf891efcb2bd591
shipit-source-id: 572dcd8a64e774f65c5abfb8cdf891efcb2bd591
This commit is contained in:
Andy Street
2016-02-22 06:02:47 -08:00
committed by facebook-github-bot-4
parent e6c65102d4
commit 5534f8b7c7
2 changed files with 6 additions and 0 deletions

View File

@@ -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();
}

View File

@@ -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;