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
f7287a70
Commit
f7287a70
authored
Oct 21, 2019
by
yangwu.jia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bug context is null
parent
708bc523
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
11 deletions
+10
-11
android/src/main/java/com/idlefish/flutterboost/NewFlutterBoost.java
.../main/java/com/idlefish/flutterboost/NewFlutterBoost.java
+10
-11
No files found.
android/src/main/java/com/idlefish/flutterboost/NewFlutterBoost.java
View file @
f7287a70
...
@@ -23,7 +23,7 @@ public class NewFlutterBoost {
...
@@ -23,7 +23,7 @@ public class NewFlutterBoost {
private
FlutterViewContainerManager
mManager
;
private
FlutterViewContainerManager
mManager
;
private
Activity
mCurrentActiveActivity
;
private
Activity
mCurrentActiveActivity
;
private
BoostPluginRegistry
r
egistry
;
private
BoostPluginRegistry
mR
egistry
;
static
NewFlutterBoost
sInstance
=
null
;
static
NewFlutterBoost
sInstance
=
null
;
...
@@ -40,11 +40,8 @@ public class NewFlutterBoost {
...
@@ -40,11 +40,8 @@ public class NewFlutterBoost {
mPlatform
=
platform
;
mPlatform
=
platform
;
mManager
=
new
FlutterViewContainerManager
();
mManager
=
new
FlutterViewContainerManager
();
if
(
mPlatform
.
whenEngineStart
()
==
ConfigBuilder
.
IMMEDIATELY
)
{
doInitialFlutterViewRun
(
mPlatform
);
mRegistry
=
new
BoostPluginRegistry
(
this
.
engineProvider
(),
}
registry
=
new
BoostPluginRegistry
(
this
.
engineProvider
(),
mPlatform
.
getApplication
());
mPlatform
.
getApplication
());
platform
.
getApplication
().
registerActivityLifecycleCallbacks
(
new
Application
.
ActivityLifecycleCallbacks
()
{
platform
.
getApplication
().
registerActivityLifecycleCallbacks
(
new
Application
.
ActivityLifecycleCallbacks
()
{
...
@@ -55,8 +52,8 @@ public class NewFlutterBoost {
...
@@ -55,8 +52,8 @@ public class NewFlutterBoost {
if
(
mPlatform
.
whenEngineStart
()
==
ConfigBuilder
.
ANY_ACTIVITY_CREATED
)
{
if
(
mPlatform
.
whenEngineStart
()
==
ConfigBuilder
.
ANY_ACTIVITY_CREATED
)
{
Log
.
e
(
"bbbb2"
,
"xxxxx"
);
Log
.
e
(
"bbbb2"
,
"xxxxx"
);
r
egistry
.
currentActivity
(
activity
);
mR
egistry
.
currentActivity
(
activity
);
doInitialFlutterViewRun
(
mPlatform
);
doInitialFlutterViewRun
(
mPlatform
,
mRegistry
);
}
}
}
}
...
@@ -118,14 +115,16 @@ public class NewFlutterBoost {
...
@@ -118,14 +115,16 @@ public class NewFlutterBoost {
}
}
});
});
if
(
mPlatform
.
whenEngineStart
()
==
ConfigBuilder
.
IMMEDIATELY
)
{
doInitialFlutterViewRun
(
mPlatform
,
mRegistry
);
}
mPlatform
.
registerPlugins
(
registry
);
}
}
private
void
doInitialFlutterViewRun
(
Platform
platform
)
{
private
void
doInitialFlutterViewRun
(
Platform
platform
,
BoostPluginRegistry
registry
)
{
// Don't attempt to start a FlutterEngine if we're using a cached FlutterEngine.
// Don't attempt to start a FlutterEngine if we're using a cached FlutterEngine.
// if (host.getCachedEngineId() != null) {
// if (host.getCachedEngineId() != null) {
// return;
// return;
...
@@ -138,8 +137,8 @@ public class NewFlutterBoost {
...
@@ -138,8 +137,8 @@ public class NewFlutterBoost {
// So this is expected behavior in many cases.
// So this is expected behavior in many cases.
return
;
return
;
}
}
platform
.
registerPlugins
(
registry
);
Log
.
e
(
"bbbb3"
,
"xxxxx"
);
// The engine needs to receive the Flutter app's initial route before executing any
// The engine needs to receive the Flutter app's initial route before executing any
// Dart code to ensure that the initial route arrives in time to be applied.
// Dart code to ensure that the initial route arrives in time to be applied.
if
(
platform
.
initialRoute
()
!=
null
)
{
if
(
platform
.
initialRoute
()
!=
null
)
{
...
@@ -270,6 +269,6 @@ public class NewFlutterBoost {
...
@@ -270,6 +269,6 @@ public class NewFlutterBoost {
}
}
public
BoostPluginRegistry
getPluginRegistry
(){
public
BoostPluginRegistry
getPluginRegistry
(){
return
r
egistry
;
return
mR
egistry
;
}
}
}
}
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