Commit 8d797657 authored by yangwu.jia's avatar yangwu.jia

fix the leak

parent f78fb4b9
......@@ -22,7 +22,7 @@ rootProject.allprojects {
apply plugin: 'com.android.library'
android {
compileSdkVersion 26
compileSdkVersion 28
buildToolsVersion '27.0.3'
defaultConfig {
minSdkVersion 16
......
......@@ -54,7 +54,7 @@ public class BoostFlutterView extends FrameLayout {
private BoostFlutterEngine mFlutterEngine;
private XFlutterView mFlutterView;
private PlatformPlugin mPlatformPlugin;
private XPlatformPlugin mPlatformPlugin;
private Bundle mArguments;
......@@ -114,7 +114,7 @@ public class BoostFlutterView extends FrameLayout {
if (mArguments == null) {
mArguments = new Bundle();
}
mPlatformPlugin = new PlatformPlugin((Activity) getContext(), mFlutterEngine.getPlatformChannel());
mPlatformPlugin = new XPlatformPlugin((Activity) getContext(), mFlutterEngine.getPlatformChannel());
mFlutterView = new XFlutterView(getContext(), getRenderMode(), getTransparencyMode());
addView(mFlutterView, new FrameLayout.LayoutParams(
......@@ -295,6 +295,7 @@ public class BoostFlutterView extends FrameLayout {
mFlutterView.removeOnFirstFrameRenderedListener(mOnFirstFrameRenderedListener);
mFlutterView.release();
mPlatformPlugin.release();
}
//混合栈的返回和原来Flutter的返回逻辑不同
......
......@@ -13,6 +13,7 @@ public class XAndroidKeyProcessor {
private final KeyEventChannel keyEventChannel;
@NonNull
private final XTextInputPlugin textInputPlugin;
private int combiningCharacter;
public XAndroidKeyProcessor(@NonNull KeyEventChannel keyEventChannel, @NonNull XTextInputPlugin textInputPlugin) {
......@@ -20,6 +21,7 @@ public class XAndroidKeyProcessor {
this.textInputPlugin = textInputPlugin;
}
public void onKeyUp(@NonNull KeyEvent keyEvent) {
Character complexCharacter = applyCombiningCharacterToBaseCharacter(keyEvent.getUnicodeChar());
keyEventChannel.keyUp(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment