Browse Source

Annotate ReactContext with NonNull annotation

We need handle situation where currently emitAppLaunched is being called with null context.
Related to #3392
Guy Carmeli 6 years ago
parent
commit
821f760df1

+ 3
- 1
lib/android/app/src/main/java/com/reactnativenavigation/react/NavigationReactInitializer.java View File

1
 package com.reactnativenavigation.react;
1
 package com.reactnativenavigation.react;
2
 
2
 
3
+import android.support.annotation.NonNull;
4
+
3
 import com.facebook.react.ReactInstanceManager;
5
 import com.facebook.react.ReactInstanceManager;
4
 import com.facebook.react.bridge.ReactContext;
6
 import com.facebook.react.bridge.ReactContext;
5
 import com.reactnativenavigation.NavigationActivity;
7
 import com.reactnativenavigation.NavigationActivity;
50
 		}
52
 		}
51
 	}
53
 	}
52
 
54
 
53
-	private void emitAppLaunched(ReactContext context) {
55
+	private void emitAppLaunched(@NonNull ReactContext context) {
54
 		waitingForAppLaunchEvent = false;
56
 		waitingForAppLaunchEvent = false;
55
 		new EventEmitter(context).appLaunched();
57
 		new EventEmitter(context).appLaunched();
56
 	}
58
 	}