Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Prev Previous commit
Next Next commit
review fixes
  • Loading branch information
Chris Yang committed Oct 14, 2019
commit a37694b49ac3f1035718e4c5c5d58c3a0ed166a6
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,17 @@ public void onAttachedToEngine(@NonNull FlutterPlugin.FlutterPluginBinding bindi

@Override
public void onDetachedFromEngine(@NonNull FlutterPlugin.FlutterPluginBinding binding) {
channel.setMethodCallHandler(null);
teardownChannel();
}

private void setupChannel(BinaryMessenger messenger, Context context) {
channel = new MethodChannel(messenger, CHANNEL_NAME);
MethodCallHandlerImpl handler = new MethodCallHandlerImpl(context);
channel.setMethodCallHandler(handler);
}

private void teardownChannel() {
channel.setMethodCallHandler(null);
channel = null;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
android:windowSoftInputMode="adjustResize">
</activity>
<activity android:name=".MainActivity"
android:launchMode="singleTop"
android:theme="@android:style/Theme.Black.NoTitleBar"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection"
android:hardwareAccelerated="true"
Expand Down