Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v1][Android] react-native v.0.57 compatibility / remove deprecated UIImplementationProvider #3836

Merged
merged 2 commits into from
Aug 30, 2018
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
import com.facebook.react.bridge.ReactContext;
import com.facebook.react.uimanager.UIImplementationProvider;
import com.facebook.react.uimanager.UIManagerModule;
import com.reactnativenavigation.bridge.EventEmitter;
import com.reactnativenavigation.controllers.ActivityCallbacks;
Expand All @@ -35,7 +34,7 @@ public void onCreate() {
super.onCreate();
instance = this;
handler = new Handler(getMainLooper());
reactGateway = new NavigationReactGateway(getUIImplementationProvider());
reactGateway = new NavigationReactGateway();
eventEmitter = new EventEmitter(reactGateway);
activityCallbacks = new ActivityCallbacks();
}
Expand All @@ -54,11 +53,6 @@ public void startActivity(Intent intent) {
}
}

// here in case someone wants to override this
protected UIImplementationProvider getUIImplementationProvider() {
return null; // if null the default UIImplementationProvider will be used
}

public void startReactContextOnceInBackgroundAndExecuteJS() {
reactGateway.startReactContextOnceInBackgroundAndExecuteJS();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import com.facebook.react.bridge.ReactContext;
import com.facebook.react.modules.core.DefaultHardwareBackBtnHandler;
import com.facebook.react.shell.MainReactPackage;
import com.facebook.react.uimanager.UIImplementationProvider;
import com.reactnativenavigation.NavigationApplication;
import com.reactnativenavigation.bridge.NavigationReactEventEmitter;
import com.reactnativenavigation.bridge.NavigationReactPackage;
Expand All @@ -29,28 +28,7 @@ public class NavigationReactGateway implements ReactGateway {
private JsDevReloadHandler jsDevReloadHandler;

public NavigationReactGateway() {
this(null);
}

public NavigationReactGateway(final UIImplementationProvider customImplProvider) {

if (customImplProvider != null) {
host = new ReactNativeHostImpl() {
/**
* This was added in case someone needs to provide a different UIImplementationProvider
* @param {UIImplementationProvider} defaultProvider
* @return {UIImplementationProvider}
*/
@Override
protected UIImplementationProvider getUIImplementationProvider() {
return customImplProvider;
}
};
} else {
host = new ReactNativeHostImpl();
}


host = new ReactNativeHostImpl();
jsDevReloadHandler = new JsDevReloadHandler();
}

Expand Down