Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
review fixes
  • Loading branch information
Chris Yang committed Oct 14, 2019
commit 05d9709510bfa076064a47f69888376fa6e04204
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,17 @@ public void onAttachedToEngine(FlutterPlugin.FlutterPluginBinding binding) {

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

private void setupMethodChannel(BinaryMessenger messenger, ContentResolver contentResolver) {
channel = new MethodChannel(messenger, "plugins.flutter.io/device_info");
final MethodCallHandlerImpl handler = new MethodCallHandlerImpl(contentResolver);
channel.setMethodCallHandler(handler);
}

private void tearDownChannel() {
channel.setMethodCallHandler(null);
channel = null;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,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