瀏覽代碼

remove deprecated com.facebook.react.uimanager.UIImplementationProvider (#3836)

Johannes Kronmüller 6 年之前
父節點
當前提交
22b3b40d3a

+ 1
- 7
android/app/src/main/java/com/reactnativenavigation/NavigationApplication.java 查看文件

@@ -12,7 +12,6 @@ import com.facebook.react.ReactApplication;
12 12
 import com.facebook.react.ReactNativeHost;
13 13
 import com.facebook.react.ReactPackage;
14 14
 import com.facebook.react.bridge.ReactContext;
15
-import com.facebook.react.uimanager.UIImplementationProvider;
16 15
 import com.facebook.react.uimanager.UIManagerModule;
17 16
 import com.reactnativenavigation.bridge.EventEmitter;
18 17
 import com.reactnativenavigation.controllers.ActivityCallbacks;
@@ -35,7 +34,7 @@ public abstract class NavigationApplication extends Application implements React
35 34
         super.onCreate();
36 35
         instance = this;
37 36
         handler = new Handler(getMainLooper());
38
-        reactGateway = new NavigationReactGateway(getUIImplementationProvider());
37
+        reactGateway = new NavigationReactGateway();
39 38
         eventEmitter = new EventEmitter(reactGateway);
40 39
         activityCallbacks = new ActivityCallbacks();
41 40
     }
@@ -54,11 +53,6 @@ public abstract class NavigationApplication extends Application implements React
54 53
         }
55 54
     }
56 55
 
57
-    // here in case someone wants to override this
58
-    protected UIImplementationProvider getUIImplementationProvider() {
59
-        return null; // if null the default UIImplementationProvider will be used
60
-    }
61
-
62 56
     public void startReactContextOnceInBackgroundAndExecuteJS() {
63 57
         reactGateway.startReactContextOnceInBackgroundAndExecuteJS();
64 58
     }

+ 1
- 23
android/app/src/main/java/com/reactnativenavigation/react/NavigationReactGateway.java 查看文件

@@ -10,7 +10,6 @@ import com.facebook.react.ReactPackage;
10 10
 import com.facebook.react.bridge.ReactContext;
11 11
 import com.facebook.react.modules.core.DefaultHardwareBackBtnHandler;
12 12
 import com.facebook.react.shell.MainReactPackage;
13
-import com.facebook.react.uimanager.UIImplementationProvider;
14 13
 import com.reactnativenavigation.NavigationApplication;
15 14
 import com.reactnativenavigation.bridge.NavigationReactEventEmitter;
16 15
 import com.reactnativenavigation.bridge.NavigationReactPackage;
@@ -29,28 +28,7 @@ public class NavigationReactGateway implements ReactGateway {
29 28
 	private JsDevReloadHandler jsDevReloadHandler;
30 29
 
31 30
 	public NavigationReactGateway() {
32
-		this(null);
33
-	}
34
-
35
-	public NavigationReactGateway(final UIImplementationProvider customImplProvider) {
36
-
37
-		if (customImplProvider != null) {
38
-			host = new ReactNativeHostImpl() {
39
-				/**
40
-				 * This was added in case someone needs to provide a different UIImplementationProvider
41
-				 * @param {UIImplementationProvider} defaultProvider
42
-				 * @return {UIImplementationProvider}
43
-				 */
44
-				@Override
45
-				protected UIImplementationProvider getUIImplementationProvider() {
46
-					return customImplProvider;
47
-				}
48
-			};
49
-		} else {
50
-			host = new ReactNativeHostImpl();
51
-		}
52
-
53
-
31
+		host = new ReactNativeHostImpl();
54 32
 		jsDevReloadHandler = new JsDevReloadHandler();
55 33
 	}
56 34