Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions packages/platform-android/native_modules.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,16 @@ import java.util.ArrayList;
{{ packageImports }}

public class PackageList {
private Application application;
private ReactNativeHost reactNativeHost;
public PackageList(ReactNativeHost reactNativeHost) {
this.reactNativeHost = reactNativeHost;
}

public PackageList(Application application) {
this.reactNativeHost = null;
this.application = application;
}

private ReactNativeHost getReactNativeHost() {
return this.reactNativeHost;
Expand All @@ -31,6 +37,7 @@ public class PackageList {
}

private Application getApplication() {
if (this.reactNativeHost == null) return this.application;
return this.reactNativeHost.getApplication();
}

Expand Down