Browse Source

Drop RN 0.46 support

Guy Carmeli 6 years ago
parent
commit
def61e9d60

+ 3
- 10
lib/android/app/src/main/java/com/reactnativenavigation/react/NavigationPackage.java View File

@@ -2,12 +2,10 @@ package com.reactnativenavigation.react;
2 2
 
3 3
 import com.facebook.react.ReactNativeHost;
4 4
 import com.facebook.react.ReactPackage;
5
-import com.facebook.react.bridge.JavaScriptModule;
6 5
 import com.facebook.react.bridge.NativeModule;
7 6
 import com.facebook.react.bridge.ReactApplicationContext;
8 7
 import com.facebook.react.uimanager.ViewManager;
9 8
 
10
-import java.util.Arrays;
11 9
 import java.util.Collections;
12 10
 import java.util.List;
13 11
 
@@ -15,19 +13,14 @@ public class NavigationPackage implements ReactPackage {
15 13
 
16 14
 	private ReactNativeHost reactNativeHost;
17 15
 
18
-	public NavigationPackage(final ReactNativeHost reactNativeHost) {
16
+	@SuppressWarnings("WeakerAccess")
17
+    public NavigationPackage(final ReactNativeHost reactNativeHost) {
19 18
 		this.reactNativeHost = reactNativeHost;
20 19
 	}
21 20
 
22 21
 	@Override
23 22
 	public List<NativeModule> createNativeModules(ReactApplicationContext reactContext) {
24
-		return Arrays.<NativeModule>asList(
25
-				new NavigationModule(reactContext, reactNativeHost.getReactInstanceManager())
26
-		);
27
-	}
28
-
29
-	public List<Class<? extends JavaScriptModule>> createJSModules() {
30
-		return Collections.emptyList();
23
+		return Collections.singletonList(new NavigationModule(reactContext, reactNativeHost.getReactInstanceManager()));
31 24
 	}
32 25
 
33 26
 	@Override