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
973ccd97
Commit
973ccd97
authored
Apr 24, 2020
by
justin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
回滚 注册方式
parent
7a6ee43a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
7 deletions
+19
-7
android/src/main/java/com/idlefish/flutterboost/BoostRegistrar.java
...c/main/java/com/idlefish/flutterboost/BoostRegistrar.java
+1
-1
android/src/main/java/com/idlefish/flutterboost/FlutterBoost.java
...src/main/java/com/idlefish/flutterboost/FlutterBoost.java
+5
-2
android/src/main/java/com/idlefish/flutterboost/Platform.java
...oid/src/main/java/com/idlefish/flutterboost/Platform.java
+10
-1
example/android/app/src/main/AndroidManifest.xml
example/android/app/src/main/AndroidManifest.xml
+3
-3
No files found.
android/src/main/java/com/idlefish/flutterboost/BoostRegistrar.java
View file @
973ccd97
...
...
@@ -52,7 +52,7 @@ class BoostRegistrar implements Registrar, FlutterPlugin, ActivityAware {
}
public
Context
context
()
{
return
this
.
pluginBinding
!=
null
?
this
.
pluginBinding
.
getApplicationContext
()
:
null
;
return
this
.
pluginBinding
!=
null
?
this
.
pluginBinding
.
getApplicationContext
()
:
FlutterBoost
.
instance
().
platform
().
getApplication
()
;
}
public
Context
activeContext
()
{
...
...
android/src/main/java/com/idlefish/flutterboost/FlutterBoost.java
View file @
973ccd97
...
...
@@ -15,6 +15,7 @@ import io.flutter.embedding.engine.FlutterJNI;
import
io.flutter.embedding.engine.FlutterShellArgs
;
import
io.flutter.embedding.engine.dart.DartExecutor
;
import
io.flutter.embedding.engine.loader.FlutterLoader
;
import
io.flutter.plugin.common.PluginRegistry
;
import
io.flutter.view.FlutterMain
;
import
java.lang.reflect.Method
;
...
...
@@ -33,6 +34,7 @@ public class FlutterBoost {
private
long
FlutterPostFrameCallTime
=
0
;
private
Application
.
ActivityLifecycleCallbacks
mActivityLifecycleCallbacks
;
private
PluginRegistry
mRegistry
;
public
long
getFlutterPostFrameCallTime
()
{
return
FlutterPostFrameCallTime
;
...
...
@@ -323,8 +325,9 @@ public class FlutterBoost {
mPlatform
.
getApplication
().
getApplicationContext
(),
flutterShellArgs
.
toArray
());
mEngine
=
new
FlutterEngine
(
mPlatform
.
getApplication
().
getApplicationContext
(),
FlutterLoader
.
getInstance
(),
new
FlutterJNI
(),
null
,
false
);
registerPlugins
(
mEngine
);
// registerPlugins(mEngine);
mRegistry
=
new
BoostPluginRegistry
(
createEngine
());
mPlatform
.
registerPlugins
(
mRegistry
);
}
return
mEngine
;
...
...
android/src/main/java/com/idlefish/flutterboost/Platform.java
View file @
973ccd97
...
...
@@ -49,5 +49,14 @@ public abstract class Platform {
record
.
getContainer
().
finishContainer
(
result
);
}
public
void
registerPlugins
(
PluginRegistry
mRegistry
)
{
try
{
Class
clz
=
Class
.
forName
(
"io.flutter.plugins.GeneratedPluginRegistrant"
);
Method
method
=
clz
.
getDeclaredMethod
(
"registerWith"
,
PluginRegistry
.
class
);
method
.
invoke
(
null
,
mRegistry
);
}
catch
(
Throwable
t
)
{
Log
.
i
(
"flutterboost.platform"
,
t
.
toString
());
}
}
}
example/android/app/src/main/AndroidManifest.xml
View file @
973ccd97
...
...
@@ -60,8 +60,8 @@
android:theme=
"@style/Theme.AppCompat"
android:configChanges=
"orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density"
android:windowSoftInputMode=
"adjustResize"
/>
<
meta-data
android:name=
"flutterEmbedding"
android:value=
"2"
>
<
/meta-data
>
<
!--<meta-data android:name="flutterEmbedding"-->
<!--android:value="2">--
>
<
!--</meta-data>--
>
</application>
</manifest>
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