Skip to content

Commit

Permalink
Make getCurrentActivity public on ReactContext
Browse files Browse the repository at this point in the history
Summary:
Addresses #8661
Closes #9071

Differential Revision: D3641285

Pulled By: foghina

fbshipit-source-id: dede86743efddc33b6ead053e805770fc213685c
  • Loading branch information
Marc Shilling authored and Facebook Github Bot 9 committed Jul 29, 2016
1 parent a06e4b7 commit 7606564
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -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;
}
Expand Down

1 comment on commit 7606564

@39otrebla
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.