|
@@ -64,14 +64,22 @@ public class NavigationReactGateway implements ReactGateway {
|
64
|
64
|
}
|
65
|
65
|
|
66
|
66
|
public void onDestroyApp(Activity activity) {
|
67
|
|
- getReactInstanceManager().onHostDestroy(activity);
|
|
67
|
+ if (NavigationApplication.instance.clearHostOnActivityDestroy()) {
|
|
68
|
+ getReactInstanceManager().onHostDestroy();
|
|
69
|
+ } else if (hasStartedCreatingContext()) {
|
|
70
|
+ getReactInstanceManager().onHostDestroy(activity);
|
|
71
|
+ }
|
68
|
72
|
if (NavigationApplication.instance.clearHostOnActivityDestroy()) {
|
69
|
73
|
host.clear();
|
70
|
74
|
}
|
71
|
75
|
}
|
72
|
76
|
|
73
|
77
|
public void onPauseActivity(Activity activity) {
|
74
|
|
- getReactInstanceManager().onHostPause(activity);
|
|
78
|
+ if (NavigationApplication.instance.clearHostOnActivityDestroy()) {
|
|
79
|
+ getReactInstanceManager().onHostPause();
|
|
80
|
+ } else if (hasStartedCreatingContext()) {
|
|
81
|
+ getReactInstanceManager().onHostPause(activity);
|
|
82
|
+ }
|
75
|
83
|
jsDevReloadHandler.onPauseActivity();
|
76
|
84
|
}
|
77
|
85
|
|