Please sign in to comment.
Add Activity to onActivityResult listener interface
Summary: The Android lifecycle is weird: turns out `onActivityResult` is called before `onResume`. This means `getCurrentActivity()` could return the wrong instance, or `null` if the activity was destroyed. To give developers access to the Activity receiving the result (which is also about to become the current activity), pass it as an argumento the listener. Fixes github issue #8694. Reviewed By: donyu Differential Revision: D3704141 fbshipit-source-id: e7e00ccc28114f97415e5beab8c9b10cb1e530be
- Loading branch information...
Showing with 22 additions and 9 deletions.
- +1 −1 ReactAndroid/src/main/java/com/facebook/react/ReactActivityDelegate.java
- +5 −1 ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManager.java
- +2 −2 ReactAndroid/src/main/java/com/facebook/react/XReactInstanceManagerImpl.java
- +4 −2 ReactAndroid/src/main/java/com/facebook/react/bridge/ActivityEventListener.java
- +8 −1 ReactAndroid/src/main/java/com/facebook/react/bridge/BaseActivityEventListener.java
- +2 −2 ReactAndroid/src/main/java/com/facebook/react/bridge/ReactContext.java