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
1
Merge Requests
1
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
9c19498c
Commit
9c19498c
authored
Oct 30, 2019
by
yangwu.jia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
注册时机修改
parent
f0aa4aec
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
18 deletions
+18
-18
android/src/main/java/com/idlefish/flutterboost/BoostRegistrar.java
...c/main/java/com/idlefish/flutterboost/BoostRegistrar.java
+7
-1
android/src/main/java/com/idlefish/flutterboost/NewFlutterBoost.java
.../main/java/com/idlefish/flutterboost/NewFlutterBoost.java
+11
-16
android/src/main/java/com/idlefish/flutterboost/containers/FlutterActivityAndFragmentDelegate.java
...rboost/containers/FlutterActivityAndFragmentDelegate.java
+0
-1
No files found.
android/src/main/java/com/idlefish/flutterboost/BoostRegistrar.java
View file @
9c19498c
...
...
@@ -43,7 +43,13 @@ class BoostRegistrar implements Registrar, FlutterPlugin, ActivityAware {
}
public
Activity
activity
()
{
return
this
.
activityPluginBinding
!=
null
?
this
.
activityPluginBinding
.
getActivity
()
:
null
;
if
(
this
.
activityPluginBinding
!=
null
){
return
this
.
activityPluginBinding
.
getActivity
();
}
if
(
NewFlutterBoost
.
instance
().
currentActivity
()!=
null
){
return
NewFlutterBoost
.
instance
().
currentActivity
();
}
return
null
;
}
public
Context
context
()
{
...
...
android/src/main/java/com/idlefish/flutterboost/NewFlutterBoost.java
View file @
9c19498c
...
...
@@ -29,8 +29,6 @@ public class NewFlutterBoost {
private
FlutterEngine
mEngine
;
private
Activity
mCurrentActiveActivity
;
private
PluginRegistry
mRegistry
;
private
boolean
hasRegistry
=
false
;
static
NewFlutterBoost
sInstance
=
null
;
public
static
NewFlutterBoost
instance
()
{
...
...
@@ -159,8 +157,8 @@ public class NewFlutterBoost {
);
flutterEngine
.
getDartExecutor
().
executeDartEntrypoint
(
entrypoint
);
mRegistry
=
new
BoostPluginRegistry
(
createEngine
());
registerPlugins
();
}
...
...
@@ -317,20 +315,17 @@ public class NewFlutterBoost {
}
public
void
registerPlugins
()
{
if
(!
hasRegistry
&&
mRegistry
!=
null
){
try
{
Class
clz
=
Class
.
forName
(
"io.flutter.plugins.GeneratedPluginRegistrant"
);
Method
method
=
clz
.
getDeclaredMethod
(
"registerWith"
,
PluginRegistry
.
class
);
method
.
invoke
(
null
,
mRegistry
);
}
catch
(
Throwable
t
)
{
throw
new
RuntimeException
(
t
);
}
private
void
registerPlugins
()
{
try
{
Class
clz
=
Class
.
forName
(
"io.flutter.plugins.GeneratedPluginRegistrant"
);
Method
method
=
clz
.
getDeclaredMethod
(
"registerWith"
,
PluginRegistry
.
class
);
method
.
invoke
(
null
,
mRegistry
);
}
catch
(
Throwable
t
)
{
throw
new
RuntimeException
(
t
);
}
if
(
mPlatform
.
lifecycleListener
!=
null
){
mPlatform
.
lifecycleListener
.
onPluginsRegistered
();
}
hasRegistry
=
true
;
if
(
mPlatform
.
lifecycleListener
!=
null
){
mPlatform
.
lifecycleListener
.
onPluginsRegistered
();
}
...
...
android/src/main/java/com/idlefish/flutterboost/containers/FlutterActivityAndFragmentDelegate.java
View file @
9c19498c
...
...
@@ -134,7 +134,6 @@ public class FlutterActivityAndFragmentDelegate implements IFlutterViewContaine
host
.
getActivity
(),
host
.
getLifecycle
()
);
NewFlutterBoost
.
instance
().
registerPlugins
();
mSyncer
=
NewFlutterBoost
.
instance
().
containerManager
().
generateSyncer
(
this
);
...
...
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