Permalink
Browse files

Make getCurrentActivity public on ReactContext

Summary:
Addresses #8661
Closes #9071

Differential Revision: D3641285

Pulled By: foghina

fbshipit-source-id: dede86743efddc33b6ead053e805770fc213685c
  • Loading branch information...
1 parent a06e4b7 commit 760656461197605ee26769ed73989f78e4753038 Marc Shilling committed with Facebook Github Bot 9 Jul 29, 2016
Showing with 1 addition and 1 deletion.
  1. +1 −1 ReactAndroid/src/main/java/com/facebook/react/bridge/ReactContext.java
@@ -283,7 +283,7 @@ public boolean startActivityForResult(Intent intent, int code, Bundle bundle) {
* DO NOT HOLD LONG-LIVED REFERENCES TO THE OBJECT RETURNED BY THIS METHOD, AS THIS WILL CAUSE
* MEMORY LEAKS.
*/
- /* package */ @Nullable Activity getCurrentActivity() {
+ public @Nullable Activity getCurrentActivity() {
if (mCurrentActivity == null) {
return null;
}

1 comment on commit 7606564

@39otrebla

Great! I am writing a custom ViewManager and was wondering how to access activity instance after RN@0.29. (see this question).
Thank you!

Please sign in to comment.