[Mono.Android] Fix handwritten build warnings - #12834
Merged
Merged
Conversation
Replace obsolete helper usage, scope unavoidable compatibility warnings, and align authentication nullability with its implementations. Remove warning suppressions that are no longer needed by handwritten sources while leaving generated binding diagnostics for a follow-up. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
One or more issues must be addressed before approval.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (1)
What changed in this PR
Updates handwritten Mono.Android sources to eliminate compiler/analyzer warnings while preserving legacy APIs and correcting authentication nullability.
Changes:
- Replaces obsolete event/parser helpers.
- Adds scoped compatibility warning suppressions.
- Updates nullable API baselines and removes obsolete project-wide warning suppressions.
| File | Description |
|---|---|
| src/Mono.Android/Xamarin.Android.Net/IAndroidAuthenticationModule.cs | Updated as part of this pull request. |
| src/Mono.Android/Xamarin.Android.Net/AndroidMessageHandler.cs | Updated as part of this pull request. |
| src/Mono.Android/PublicAPI/API-37/PublicAPI.Unshipped.txt | Updated as part of this pull request. |
| src/Mono.Android/PublicAPI/API-37.2/PublicAPI.Unshipped.txt | Updated as part of this pull request. |
| src/Mono.Android/PublicAPI/API-37.1/PublicAPI.Unshipped.txt | Updated as part of this pull request. |
| src/Mono.Android/Mono.Android.csproj | Updated as part of this pull request. |
| src/Mono.Android/Java.IO/ObjectStreamField.cs | Updated as part of this pull request. |
| src/Mono.Android/Android.Widget/MediaController.cs | Updated as part of this pull request. |
| src/Mono.Android/Android.Widget/AbsListView.cs | Updated as part of this pull request. |
| src/Mono.Android/Android.Views/WindowManagerLayoutParams.cs | Updated as part of this pull request. |
| src/Mono.Android/Android.Views/View.cs | Updated as part of this pull request. |
| src/Mono.Android/Android.Views/MotionEvent.cs | Updated as part of this pull request. |
| src/Mono.Android/Android.Telecom/InCallService.cs | Updated as part of this pull request. |
| src/Mono.Android/Android.Runtime/XmlReaderPullParser.cs | Updated as part of this pull request. |
| src/Mono.Android/Android.Runtime/XmlPullParserReader.cs | Updated as part of this pull request. |
| src/Mono.Android/Android.Runtime/TimingLogger.cs | Updated as part of this pull request. |
| src/Mono.Android/Android.Runtime/JavaSet.cs | Updated as part of this pull request. |
| src/Mono.Android/Android.Runtime/JavaList.cs | Updated as part of this pull request. |
| src/Mono.Android/Android.Runtime/JavaDictionary.cs | Updated as part of this pull request. |
| src/Mono.Android/Android.Runtime/JavaCollection.cs | Updated as part of this pull request. |
| src/Mono.Android/Android.Runtime/AndroidRuntime.cs | Updated as part of this pull request. |
| src/Mono.Android/Android.Content/Context.cs | Updated as part of this pull request. |
| src/Mono.Android/Android.Content/ContentProvider.cs | Updated as part of this pull request. |
| src/Mono.Android/Android.App/Notification.cs | Updated as part of this pull request. |
| src/Mono.Android/Android.App/AlertDialog.cs | Updated as part of this pull request. |
| src/Mono.Android/Android.App/ActionBar.cs | Updated as part of this pull request. |
| src/Mono.Android/Android.Accounts/AccountManager.cs | Updated as part of this pull request. |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
jonathanpeppers
approved these changes
Sep 21, 2026
Member
|
@dalexsoto review |
dalexsoto
approved these changes
Sep 21, 2026
dalexsoto
left a comment
Member
There was a problem hiding this comment.
The event and parser changes preserve the existing contracts, and the nullable authentication returns are consistent with their implementations and all three API baselines. No blocking issues found.
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 free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Summary
src/Mono.AndroidC# sourcesIAndroidAuthenticationModulereturn nullability and update API baselinesCS8609,CS8610,CS8613,CS8614, andCS8617from the project-wideNoWarnlistGenerated binding and
JNIEnv.g.cswarnings remain suppressed for now and will be addressed in a dependent code-generation PR.Validation
NoWarncleared