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

Fix API typo #4487

Merged
merged 6 commits into from
Jan 2, 2018
Merged

Fix API typo #4487

merged 6 commits into from
Jan 2, 2018

Conversation

mravn-google
Copy link
Contributor

@mravn-google mravn-google commented Dec 21, 2017

Breaking change (posted here)

Plugin registry on Android by mistake renamed the Android concept RequestPermissionsResult to RequestPermissionResult which is unnecessarily confusing.

Fixes flutter/flutter#10853

@mravn-google
Copy link
Contributor Author

@cbracken @Hixie Is our policy still to cleanly break the API rather than adding new + deprecating old in a grace period?

@chinmaygarde
Copy link
Member

Ideally something like this (which I forgot I need to put into the wiki). But I am not sure if this qualifies since this API is so new. Was this already pushed out in a roll?

@mravn-google
Copy link
Contributor Author

@chinmaygarde The API containing the typo has been public for eight months. Thanks for the link, I'll follow the guidance of that document.

@chinmaygarde
Copy link
Member

@mravn-google Thanks! Your input on how the mark the APIs unavailable in Java would be great. I only know of at-Deprecated but my Java foo is weak. Also, it would be great if you added to the examples of how you did this breaking change.

@mravn-google mravn-google requested a review from sigurdm January 2, 2018 13:51
Copy link
Contributor

@sigurdm sigurdm left a comment

Choose a reason for hiding this comment

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

LGTM

public boolean onRequestPermissionResult(
int requestCode, String[] permissions, int[] grantResults) {
return flutterView.getPluginRegistry().onRequestPermissionResult(requestCode, permissions, grantResults);
return flutterView.getPluginRegistry().onRequestPermissionsResult(requestCode, permissions, grantResults);
Copy link
Contributor

Choose a reason for hiding this comment

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

Call the new method instead

@mravn-google mravn-google merged commit 288897b into flutter:master Jan 2, 2018
@mravn-google mravn-google deleted the fix_api_typo branch January 2, 2018 14:32
cbracken added a commit to cbracken/flutter_engine that referenced this pull request May 25, 2019
In breaking change flutter#4487, a typo was fixed in our Android
APIs correcting RequestPermissionResult to RequestPermissionsResult
(note the 's' on Permissions) for consistency with the Android SDK.

Various tombstone comments were left to help guide developers in the
right direction. These comments were slated for removal in March of
2018; at over a year later, we can probably safely remove them.
cbracken added a commit that referenced this pull request May 25, 2019
In breaking change #4487, a typo was fixed in our Android
APIs correcting RequestPermissionResult to RequestPermissionsResult
(note the 's' on Permissions) for consistency with the Android SDK.

Various tombstone comments were left to help guide developers in the
right direction. These comments were slated for removal in March of
2018; at over a year later, we can probably safely remove them.
huqiuser pushed a commit to huqiuser/engine that referenced this pull request Jun 12, 2019
In breaking change flutter#4487, a typo was fixed in our Android
APIs correcting RequestPermissionResult to RequestPermissionsResult
(note the 's' on Permissions) for consistency with the Android SDK.

Various tombstone comments were left to help guide developers in the
right direction. These comments were slated for removal in March of
2018; at over a year later, we can probably safely remove them.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants