Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor: Port PermissionInfo related classes (Android) #1219

Merged
merged 4 commits into from
Nov 15, 2023

Conversation

JeroenWeener
Copy link
Contributor

@JeroenWeener JeroenWeener commented Nov 13, 2023

Requires merge of #1218.

Ports the necessary Android SDK bits for checking which permissions have been requested.

There is no specific ticket for this issue, but it will be necessary for implementing an Android implementation of the platform interface using the ported Android SDK (which is tracked in https://github.com/orgs/Baseflow/projects/9/views/1?pane=issue&itemId=40148957).

Pre-launch Checklist

  • I made sure the project builds.
  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy, or this PR is does not need version changes.
  • I updated CHANGELOG.md to add a description of the change.
  • I updated/added relevant documentation (doc comments with ///).
  • I rebased onto next.
  • I added new tests to check the change I am making, or this PR does not need tests.
  • I made sure all existing and new tests are passing.
  • I ran dart format . and committed any changes.
  • I ran flutter analyze and fixed any errors.

Copy link
Member

@mvanbeusekom mvanbeusekom left a comment

Choose a reason for hiding this comment

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

Small remark that I only realized now.

Comment on lines 21 to 23
// To ease adding additional methods, this value is added prematurely.
@SuppressWarnings({"unused", "FieldCanBeLocal"})
private final BinaryMessenger binaryMessenger;
Copy link
Member

Choose a reason for hiding this comment

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

Thinking a bit ahead, I don't see we would need the binaryMessenger anywhere else except for the constructor of the class. The binaryMessenger should only be used to pass into Flutter API implementation classes and these are always created in the constructor. Therefore I feel we can remove this field (and also in already existing code).

Comment on lines 21 to 23
// To ease adding additional methods, this value is added prematurely.
@SuppressWarnings({"unused", "FieldCanBeLocal"})
private final BinaryMessenger binaryMessenger;
Copy link
Member

Choose a reason for hiding this comment

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

Thinking a bit ahead, I don't see we would need the binaryMessenger anywhere else except for the constructor of the class. The binaryMessenger should only be used to pass into Flutter API implementation classes and these are always created in the constructor. Therefore I feel we can remove this field (and also in already existing code).

Comment on lines 21 to 23
// To ease adding additional methods, this value is added prematurely.
@SuppressWarnings({"unused", "FieldCanBeLocal"})
private final BinaryMessenger binaryMessenger;
Copy link
Member

Choose a reason for hiding this comment

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

Thinking a bit ahead, I don't see we would need the binaryMessenger anywhere else except for the constructor of the class. The binaryMessenger should only be used to pass into Flutter API implementation classes and these are always created in the constructor. Therefore I feel we can remove this field (and also in already existing code).

Comment on lines 21 to 23
// To ease adding additional methods, this value is added prematurely.
@SuppressWarnings({"unused", "FieldCanBeLocal"})
private final BinaryMessenger binaryMessenger;
Copy link
Member

Choose a reason for hiding this comment

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

Thinking a bit ahead, I don't see we would need the binaryMessenger anywhere else except for the constructor of the class. The binaryMessenger should only be used to pass into Flutter API implementation classes and these are always created in the constructor. Therefore I feel we can remove this field (and also in already existing code).

Comment on lines 21 to 23
// To ease adding additional methods, this value is added prematurely.
@SuppressWarnings({"unused", "FieldCanBeLocal"})
private final BinaryMessenger binaryMessenger;
Copy link
Member

Choose a reason for hiding this comment

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

Thinking a bit ahead, I don't see we would need the binaryMessenger anywhere else except for the constructor of the class. The binaryMessenger should only be used to pass into Flutter API implementation classes and these are always created in the constructor. Therefore I feel we can remove this field (and also in already existing code).

Comment on lines 24 to 26
// To ease adding additional methods, this value is added prematurely.
@SuppressWarnings({"unused", "FieldCanBeLocal"})
private final BinaryMessenger binaryMessenger;
Copy link
Member

Choose a reason for hiding this comment

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

Thinking a bit ahead, I don't see we would need the binaryMessenger anywhere else except for the constructor of the class. The binaryMessenger should only be used to pass into Flutter API implementation classes and these are always created in the constructor. Therefore I feel we can remove this field (and also in already existing code).

Comment on lines 21 to 23
// To ease adding additional methods, this value is added prematurely.
@SuppressWarnings({"unused", "FieldCanBeLocal"})
private final BinaryMessenger binaryMessenger;
Copy link
Member

Choose a reason for hiding this comment

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

Thinking a bit ahead, I don't see we would need the binaryMessenger anywhere else except for the constructor of the class. The binaryMessenger should only be used to pass into Flutter API implementation classes and these are always created in the constructor. Therefore I feel we can remove this field (and also in already existing code).

Comment on lines 21 to 23
// To ease adding additional methods, this value is added prematurely.
@SuppressWarnings({"unused", "FieldCanBeLocal"})
private final BinaryMessenger binaryMessenger;
Copy link
Member

Choose a reason for hiding this comment

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

Thinking a bit ahead, I don't see we would need the binaryMessenger anywhere else except for the constructor of the class. The binaryMessenger should only be used to pass into Flutter API implementation classes and these are always created in the constructor. Therefore I feel we can remove this field (and also in already existing code).

Comment on lines 21 to 23
// To ease adding additional methods, this value is added prematurely.
@SuppressWarnings({"unused", "FieldCanBeLocal"})
private final BinaryMessenger binaryMessenger;
Copy link
Member

Choose a reason for hiding this comment

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

Thinking a bit ahead, I don't see we would need the binaryMessenger anywhere else except for the constructor of the class. The binaryMessenger should only be used to pass into Flutter API implementation classes and these are always created in the constructor. Therefore I feel we can remove this field (and also in already existing code).

Comment on lines 21 to 23
// To ease adding additional methods, this value is added prematurely.
@SuppressWarnings({"unused", "FieldCanBeLocal"})
private final BinaryMessenger binaryMessenger;
Copy link
Member

Choose a reason for hiding this comment

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

Thinking a bit ahead, I don't see we would need the binaryMessenger anywhere else except for the constructor of the class. The binaryMessenger should only be used to pass into Flutter API implementation classes and these are always created in the constructor. Therefore I feel we can remove this field (and also in already existing code).

Copy link
Member

@mvanbeusekom mvanbeusekom left a comment

Choose a reason for hiding this comment

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

LGTM

@JeroenWeener JeroenWeener merged commit 2672794 into Baseflow:next Nov 15, 2023
1 check failed
@JeroenWeener JeroenWeener deleted the feature/permission-info branch November 15, 2023 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants