Commit 8186e987 authored by Firewayer's avatar Firewayer Committed by Luke

git pick 7c93c172

parent 6e9b0a6a
...@@ -6,6 +6,9 @@ import android.app.Application; ...@@ -6,6 +6,9 @@ import android.app.Application;
import android.content.Context; import android.content.Context;
import android.os.Bundle; import android.os.Bundle;
import android.support.annotation.NonNull; import android.support.annotation.NonNull;
import android.os.Debug;
import androidx.annotation.NonNull;
import com.idlefish.flutterboost.interfaces.*; import com.idlefish.flutterboost.interfaces.*;
import io.flutter.Log; import io.flutter.Log;
import io.flutter.embedding.android.FlutterView; import io.flutter.embedding.android.FlutterView;
...@@ -30,6 +33,7 @@ public class FlutterBoost { ...@@ -30,6 +33,7 @@ public class FlutterBoost {
private Activity mCurrentActiveActivity; private Activity mCurrentActiveActivity;
private boolean mEnterActivityCreate =false; private boolean mEnterActivityCreate =false;
static FlutterBoost sInstance = null; static FlutterBoost sInstance = null;
private static boolean sInit;
private long FlutterPostFrameCallTime = 0; private long FlutterPostFrameCallTime = 0;
private Application.ActivityLifecycleCallbacks mActivityLifecycleCallbacks; private Application.ActivityLifecycleCallbacks mActivityLifecycleCallbacks;
...@@ -50,7 +54,10 @@ public class FlutterBoost { ...@@ -50,7 +54,10 @@ public class FlutterBoost {
} }
public void init(Platform platform) { public void init(Platform platform) {
if (sInit){
Debuger.log("FlutterBoost is alread inited. Do not init twice");
return;
}
mPlatform = platform; mPlatform = platform;
mManager = new FlutterViewContainerManager(); mManager = new FlutterViewContainerManager();
...@@ -150,7 +157,7 @@ public class FlutterBoost { ...@@ -150,7 +157,7 @@ public class FlutterBoost {
doInitialFlutter(); doInitialFlutter();
} }
sInit = true;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment