Uh oh!
There was an error while loading. Please reload this page.
[Mono.Android] Fix incorrect Context.RegisterReceiver enumification. - #7735
Merged
Conversation
jpobstforce-pushed
the
register-receiver
branch
2 times, most recently
from
February 6, 2023 18:30
fc5a525 to
a7a8fb1Comparejpobstforce-pushed
the
register-receiver
branch
2 times, most recently
from
July 25, 2023 15:21
4637626 to
2f4b164Comparejonpryor
commented
Jul 25, 2023
Contributor
What gives me pause is that the resulting binding makes an partialclassContext{[Obsolete("This method has an incorrect enumeration type. Use the overload that takes ReceiverFlags instead.")]publicabstractAndroid.Content.Intent?RegisterReceiver(Android.Content.BroadcastReceiver?receiver,Android.Content.IntentFilter?filter,[global::Android.Runtime.GeneratedEnum]Android.Content.ActivityFlagsflags);}which I believe means that every override also needs to be On the plus side, (effectively) nobody should ever override |
jpobst
commented
Jul 25, 2023
ContributorAuthor
Agreed.
This is the rationale I eventually went with. ~No one should override this, users should only be calling the system provided version(s) of it. |
grendello added a commit
to grendello/xamarin-android
that referenced
this pull request
Jul 25, 2023
* main: Bump to dotnet/installer@f8bab721ae 8.0.100-rc.1.23373.1 (dotnet#8202) [Mono.Android] Fix Context.RegisterReceiver() enumification (dotnet#7735)
grendello added a commit
to grendello/xamarin-android
that referenced
this pull request
Jul 27, 2023
* main: [ci] Remove .NET branches from classic release trigger (dotnet#8218) Bump to dotnet/installer@f8bab721ae 8.0.100-rc.1.23373.1 (dotnet#8202) [Mono.Android] Fix Context.RegisterReceiver() enumification (dotnet#7735) [ci] Add MAUI integration job (dotnet#8200) [vs-workload] Set EnableSideBySideManifests=true (dotnet#8179)
grendello added a commit
to grendello/xamarin-android
that referenced
this pull request
Sep 4, 2023
* main: Bump to dotnet/installer@f8bab721ae 8.0.100-rc.1.23373.1 (dotnet#8202) [Mono.Android] Fix Context.RegisterReceiver() enumification (dotnet#7735) [ci] Add MAUI integration job (dotnet#8200)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes#7503
Android.Content.Context.RegisterReceiver(BroadcastReceiver, IntentFilter, int)(+1 overload) was incorrectly enumified asActivityFlagswhen it should have beenReceiverFlags.To fix without breaking API:
[Obsolete]with description.Additionally, it was noticed that the public API tracking added in #8171 did not get flagged as an error, only a warning. Change to an error to ensure any new public API is accounted for.