From ae114495168c9469fe32a8028f19a1d051e68a2e Mon Sep 17 00:00:00 2001 From: Aaron Chiu Date: Sat, 5 Mar 2016 20:30:24 -0800 Subject: [PATCH] in ReactContext, de-reference the Activity in onPause() instead of onHostDestroy() Reviewed By: andreicoman11 Differential Revision: D3004340 fb-gh-sync-id: a408cb64565e18069a291b415b1ad9d429ba8f45 shipit-source-id: a408cb64565e18069a291b415b1ad9d429ba8f45 --- .../src/main/java/com/facebook/react/bridge/ReactContext.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactContext.java b/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactContext.java index 8e7880b59..db25b0d73 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactContext.java +++ b/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactContext.java @@ -156,6 +156,7 @@ public class ReactContext extends ContextWrapper { for (LifecycleEventListener listener : mLifecycleEventListeners) { listener.onHostPause(); } + mCurrentActivity = null; } /** @@ -166,7 +167,6 @@ public class ReactContext extends ContextWrapper { for (LifecycleEventListener listener : mLifecycleEventListeners) { listener.onHostDestroy(); } - mCurrentActivity = null; } /**