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
08671c5f
Commit
08671c5f
authored
Oct 17, 2019
by
yangwu.jia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Null pointer fixed
parent
a5aeb476
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
3 deletions
+14
-3
android/src/main/java/com/idlefish/flutterboost/XFlutterView.java
...src/main/java/com/idlefish/flutterboost/XFlutterView.java
+14
-3
No files found.
android/src/main/java/com/idlefish/flutterboost/XFlutterView.java
View file @
08671c5f
...
...
@@ -259,8 +259,15 @@ public class XFlutterView extends FrameLayout {
protected
void
onConfigurationChanged
(
@NonNull
Configuration
newConfig
)
{
super
.
onConfigurationChanged
(
newConfig
);
Log
.
v
(
TAG
,
"Configuration changed. Sending locales and user settings to Flutter."
);
try
{
sendLocalesToFlutter
(
newConfig
);
sendUserSettingsToFlutter
();
}
catch
(
Throwable
e
){
Log
.
e
(
TAG
,
"onConfigurationChanged error "
);
}
}
/**
...
...
@@ -760,8 +767,10 @@ public class XFlutterView extends FrameLayout {
}
else
{
locales
.
add
(
config
.
locale
);
}
if
(
flutterEngine
!=
null
&&
flutterEngine
.
getLocalizationChannel
()!=
null
){
flutterEngine
.
getLocalizationChannel
().
sendLocales
(
locales
);
}
}
/**
* Send various user preferences of this Android device to Flutter.
...
...
@@ -772,11 +781,13 @@ public class XFlutterView extends FrameLayout {
* FlutterEngine must be non-null when this method is invoked.
*/
private
void
sendUserSettingsToFlutter
()
{
if
(
flutterEngine
!=
null
&&
flutterEngine
.
getSettingsChannel
()!=
null
){
flutterEngine
.
getSettingsChannel
().
startMessage
()
.
setTextScaleFactor
(
getResources
().
getConfiguration
().
fontScale
)
.
setUse24HourFormat
(
DateFormat
.
is24HourFormat
(
getContext
()))
.
send
();
}
}
// TODO(mattcarroll): consider introducing a system channel for this communication instead of JNI
private
void
sendViewportMetricsToFlutter
()
{
...
...
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