Browse Source

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

Johannes Kronmüller 6 years ago
parent
commit
22b3b40d3a

+ 1
- 7
android/app/src/main/java/com/reactnativenavigation/NavigationApplication.java View File

12
 import com.facebook.react.ReactNativeHost;
12
 import com.facebook.react.ReactNativeHost;
13
 import com.facebook.react.ReactPackage;
13
 import com.facebook.react.ReactPackage;
14
 import com.facebook.react.bridge.ReactContext;
14
 import com.facebook.react.bridge.ReactContext;
15
-import com.facebook.react.uimanager.UIImplementationProvider;
16
 import com.facebook.react.uimanager.UIManagerModule;
15
 import com.facebook.react.uimanager.UIManagerModule;
17
 import com.reactnativenavigation.bridge.EventEmitter;
16
 import com.reactnativenavigation.bridge.EventEmitter;
18
 import com.reactnativenavigation.controllers.ActivityCallbacks;
17
 import com.reactnativenavigation.controllers.ActivityCallbacks;
35
         super.onCreate();
34
         super.onCreate();
36
         instance = this;
35
         instance = this;
37
         handler = new Handler(getMainLooper());
36
         handler = new Handler(getMainLooper());
38
-        reactGateway = new NavigationReactGateway(getUIImplementationProvider());
37
+        reactGateway = new NavigationReactGateway();
39
         eventEmitter = new EventEmitter(reactGateway);
38
         eventEmitter = new EventEmitter(reactGateway);
40
         activityCallbacks = new ActivityCallbacks();
39
         activityCallbacks = new ActivityCallbacks();
41
     }
40
     }
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
     public void startReactContextOnceInBackgroundAndExecuteJS() {
56
     public void startReactContextOnceInBackgroundAndExecuteJS() {
63
         reactGateway.startReactContextOnceInBackgroundAndExecuteJS();
57
         reactGateway.startReactContextOnceInBackgroundAndExecuteJS();
64
     }
58
     }

+ 1
- 23
android/app/src/main/java/com/reactnativenavigation/react/NavigationReactGateway.java View File

10
 import com.facebook.react.bridge.ReactContext;
10
 import com.facebook.react.bridge.ReactContext;
11
 import com.facebook.react.modules.core.DefaultHardwareBackBtnHandler;
11
 import com.facebook.react.modules.core.DefaultHardwareBackBtnHandler;
12
 import com.facebook.react.shell.MainReactPackage;
12
 import com.facebook.react.shell.MainReactPackage;
13
-import com.facebook.react.uimanager.UIImplementationProvider;
14
 import com.reactnativenavigation.NavigationApplication;
13
 import com.reactnativenavigation.NavigationApplication;
15
 import com.reactnativenavigation.bridge.NavigationReactEventEmitter;
14
 import com.reactnativenavigation.bridge.NavigationReactEventEmitter;
16
 import com.reactnativenavigation.bridge.NavigationReactPackage;
15
 import com.reactnativenavigation.bridge.NavigationReactPackage;
29
 	private JsDevReloadHandler jsDevReloadHandler;
28
 	private JsDevReloadHandler jsDevReloadHandler;
30
 
29
 
31
 	public NavigationReactGateway() {
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
 		jsDevReloadHandler = new JsDevReloadHandler();
32
 		jsDevReloadHandler = new JsDevReloadHandler();
55
 	}
33
 	}
56
 
34