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