Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Conversation

@zanderso
Copy link
Member

@zanderso zanderso commented Dec 15, 2017

No description provided.

@zanderso zanderso force-pushed the no-activity branch 3 times, most recently from 5a3a346 to 56d76a2 Compare December 18, 2017 21:41
Copy link
Contributor

@mravn-google mravn-google left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

}

private final Context context;
private final PluginRegistry.Registrar mRegistrar;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The mMember naming convention is not used in the existing code. I think we should either keep the current coding style, or apply the m prefix to all members.

Here and elsewhere.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed to match existing style in each file.

final EventChannel eventChannel =
new EventChannel(registrar.messenger(), "plugins.flutter.io/charging");
final BatteryPlugin instance = new BatteryPlugin(registrar.context());
final BatteryPlugin instance = new BatteryPlugin(registrar);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIK, registrar.context() constantly returns the same value. If that is correct, this change isn't strictly necessary. Are we doing it anyway for consistency with plugins that need the registrar to access the current Activity?

Same in other plugins that just need a Context, and not an Activity.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it's for consistency.


Activity activity = mRegistrar.activity();
if (activity == null) {
result.error("NO_ACTIVITY", "image_picker plugin requires a foreground activity.", null);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You've used "no_activity" in all other places in this PR.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed to no_activity here

@zanderso zanderso merged commit 4da5565 into flutter:master Dec 19, 2017
@zanderso zanderso deleted the no-activity branch December 19, 2017 18:01
julianscheel pushed a commit to jusst-engineering/plugins that referenced this pull request Mar 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants