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
 
2
 
3
 import com.facebook.react.ReactNativeHost;
3
 import com.facebook.react.ReactNativeHost;
4
 import com.facebook.react.ReactPackage;
4
 import com.facebook.react.ReactPackage;
5
-import com.facebook.react.bridge.JavaScriptModule;
6
 import com.facebook.react.bridge.NativeModule;
5
 import com.facebook.react.bridge.NativeModule;
7
 import com.facebook.react.bridge.ReactApplicationContext;
6
 import com.facebook.react.bridge.ReactApplicationContext;
8
 import com.facebook.react.uimanager.ViewManager;
7
 import com.facebook.react.uimanager.ViewManager;
9
 
8
 
10
-import java.util.Arrays;
11
 import java.util.Collections;
9
 import java.util.Collections;
12
 import java.util.List;
10
 import java.util.List;
13
 
11
 
15
 
13
 
16
 	private ReactNativeHost reactNativeHost;
14
 	private ReactNativeHost reactNativeHost;
17
 
15
 
18
-	public NavigationPackage(final ReactNativeHost reactNativeHost) {
16
+	@SuppressWarnings("WeakerAccess")
17
+    public NavigationPackage(final ReactNativeHost reactNativeHost) {
19
 		this.reactNativeHost = reactNativeHost;
18
 		this.reactNativeHost = reactNativeHost;
20
 	}
19
 	}
21
 
20
 
22
 	@Override
21
 	@Override
23
 	public List<NativeModule> createNativeModules(ReactApplicationContext reactContext) {
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
 	@Override
26
 	@Override