[Mono.Android] Remove dead ViewTreeObserver.cs#12056
Merged
Merged
Conversation
The entire body of `Android.Views/ViewTreeObserver.cs` was disabled with
`#if false`, so it compiled to nothing more than an empty
`public partial class ViewTreeObserver { }`. The actual `ViewTreeObserver`
type is produced by the binding generator, so this hand-written partial
contributed nothing to the compiled assembly and its public API surface is
unchanged by the removal.
Delete the dead file and its explicit `<Compile Include>` entry in
`Mono.Android.csproj` (the project lists sources explicitly, so the entry
must be removed too).
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 7898fa8d-194d-4aad-8d0f-9eb18d8d1f7f
Contributor
There was a problem hiding this comment.
Pull request overview
Removes a dead, manually-authored partial Android.Views.ViewTreeObserver file that was entirely compiled out (via #if false), relying solely on the binding-generator produced ViewTreeObserver type and keeping the public API surface unchanged.
Changes:
- Deleted
Android.Views/ViewTreeObserver.cs, which compiled to an empty partial type. - Removed the corresponding explicit
<Compile Include="Android.Views\ViewTreeObserver.cs" />entry fromMono.Android.csproj.
Show a summary per file
| File | Description |
|---|---|
| src/Mono.Android/Mono.Android.csproj | Drops the explicit compile item for the removed dead source file. |
| src/Mono.Android/Android.Views/ViewTreeObserver.cs | Deleted dead source that previously compiled to no functional code. |
Copilot's findings
- Files reviewed: 2/2 changed files
- Comments generated: 0
jonathanpeppers
approved these changes
Jul 14, 2026
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.
The entire body of
src/Mono.Android/Android.Views/ViewTreeObserver.cswas disabled with#if false, so it compiled to nothing more than an emptypublic partial class ViewTreeObserver { }. The actualViewTreeObservertype is produced by the binding generator, so this hand-written partial contributed nothing to the compiled assembly, and its public API surface is unchanged by the removal.This PR:
src/Mono.Android/Android.Views/ViewTreeObserver.cs.<Compile Include="Android.Views\ViewTreeObserver.cs" />entry fromMono.Android.csproj(the project lists sources explicitly, so the entry must be removed too).Pure dead-code cleanup — no behavioral or API change.