-
Notifications
You must be signed in to change notification settings - Fork 9.7k
[device_info] Support v2 android embedder. #2163
Conversation
| * The implementation of {@link MethodChannel.MethodCallHandler} for the plugin. Responsible for | ||
| * receiving method calls from method channel. | ||
| */ | ||
| public class MethodCallHandlerImpl implements MethodChannel.MethodCallHandler { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make this class default (package-private) so that we don't need to worry about breaking other clients who may be using it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
matthew-carroll
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM from a new plugin API perspective.
| return Settings.Secure.getString(context.getContentResolver(), Settings.Secure.ANDROID_ID); | ||
| @Override | ||
| public void onDetachedFromEngine(FlutterPlugin.FlutterPluginBinding binding) { | ||
| channel.setMethodCallHandler(null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Recommendation: consider defining a teardownMethodChannel() for symmetry with setupMethodChannel().
| android:windowSoftInputMode="adjustResize"> | ||
| </activity> | ||
| <activity android:name=".MainActivity" | ||
| android:launchMode="singleTop" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made a comment about singleTop in the sensor PR.
|
LGTM |
Description
Minimum work to migrate to the new android embedding.
Related Issues
flutter/flutter#41836
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]). This will ensure a smooth and quick review process.///).flutter analyze) does not report any problems on my PR.Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?