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
7422c7c1
Commit
7422c7c1
authored
Nov 12, 2019
by
yangwu.jia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
防止空指针
parent
edcd73fa
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
23 deletions
+2
-23
android/src/main/java/com/idlefish/flutterboost/XFlutterView.java
...src/main/java/com/idlefish/flutterboost/XFlutterView.java
+2
-23
No files found.
android/src/main/java/com/idlefish/flutterboost/XFlutterView.java
View file @
7422c7c1
...
@@ -692,7 +692,6 @@ public class XFlutterView extends FrameLayout {
...
@@ -692,7 +692,6 @@ public class XFlutterView extends FrameLayout {
// signifies that this View does not process input (until a new engine is attached).
// signifies that this View does not process input (until a new engine is attached).
// TODO(mattcarroll): once this is proven to work, move this line ot TextInputPlugin
// TODO(mattcarroll): once this is proven to work, move this line ot TextInputPlugin
// resolveMemoryLeaks();
// Instruct our FlutterRenderer that we are no longer interested in being its RenderSurface.
// Instruct our FlutterRenderer that we are no longer interested in being its RenderSurface.
FlutterRenderer
flutterRenderer
=
flutterEngine
.
getRenderer
();
FlutterRenderer
flutterRenderer
=
flutterEngine
.
getRenderer
();
// didRenderFirstFrame = false;
// didRenderFirstFrame = false;
...
@@ -701,30 +700,10 @@ public class XFlutterView extends FrameLayout {
...
@@ -701,30 +700,10 @@ public class XFlutterView extends FrameLayout {
flutterEngine
=
null
;
flutterEngine
=
null
;
}
}
public
void
release
(){
public
void
release
(){
if
(
textInputPlugin
!=
null
){
textInputPlugin
.
release
();
textInputPlugin
.
release
();
}
}
public
void
resolveMemoryLeaks
(){
try
{
Class
clazz
=
TextInputPlugin
.
class
;
for
(
Field
f
:
clazz
.
getDeclaredFields
())
{
System
.
out
.
println
(
f
.
isAccessible
());
f
.
setAccessible
(
true
);
if
(
f
.
get
(
this
.
textInputPlugin
)
instanceof
TextInputChannel
){
System
.
out
.
println
(
"xxxxxx:"
+
f
.
getName
());
TextInputChannel
channel
=(
TextInputChannel
)
f
.
get
(
this
.
textInputPlugin
);
channel
.
setTextInputMethodHandler
(
null
);
}
}
}
}
catch
(
Throwable
e
)
{
e
.
printStackTrace
();
}
}
/**
/**
...
...
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