Check for calls to FlutterMain.ensureInitializationComplete before startInitialization (flutter/engine#5614)

This commit is contained in:
Jason Simmons
2018-06-25 16:32:38 -07:00
committed by GitHub
parent c99feea85b
commit 1348956a03

View File

@@ -187,6 +187,9 @@ public class FlutterMain {
if (Looper.myLooper() != Looper.getMainLooper()) {
throw new IllegalStateException("ensureInitializationComplete must be called on the main thread");
}
if (sSettings == null) {
throw new IllegalStateException("ensureInitializationComplete must be called after startInitialization");
}
if (sInitialized) {
return;
}