Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
flutter_boost_1.22.4
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
谢冠章
flutter_boost_1.22.4
Commits
79455e07
Commit
79455e07
authored
Mar 20, 2020
by
justin
Committed by
GitHub
Mar 20, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #628 from Firewayer/feature/flutter_boost_init
FlutterBoost防止Init多次
parents
bef1c5c8
7c93c172
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
android/src/main/java/com/idlefish/flutterboost/FlutterBoost.java
...src/main/java/com/idlefish/flutterboost/FlutterBoost.java
+8
-2
No files found.
android/src/main/java/com/idlefish/flutterboost/FlutterBoost.java
View file @
79455e07
...
@@ -5,6 +5,8 @@ import android.app.Activity;
...
@@ -5,6 +5,8 @@ import android.app.Activity;
import
android.app.Application
;
import
android.app.Application
;
import
android.content.Context
;
import
android.content.Context
;
import
android.os.Bundle
;
import
android.os.Bundle
;
import
android.os.Debug
;
import
androidx.annotation.NonNull
;
import
androidx.annotation.NonNull
;
import
com.idlefish.flutterboost.interfaces.*
;
import
com.idlefish.flutterboost.interfaces.*
;
import
io.flutter.embedding.android.FlutterView
;
import
io.flutter.embedding.android.FlutterView
;
...
@@ -27,6 +29,7 @@ public class FlutterBoost {
...
@@ -27,6 +29,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
;
...
@@ -47,7 +50,10 @@ public class FlutterBoost {
...
@@ -47,7 +50,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
();
...
@@ -147,7 +153,7 @@ public class FlutterBoost {
...
@@ -147,7 +153,7 @@ public class FlutterBoost {
doInitialFlutter
();
doInitialFlutter
();
}
}
sInit
=
true
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment