Skip to content

[Mono.Android] Remove dead ViewTreeObserver.cs#12056

Merged
jonathanpeppers merged 1 commit into
mainfrom
simonrozsival-remove-dead-viewtreeobserver
Jul 14, 2026
Merged

[Mono.Android] Remove dead ViewTreeObserver.cs#12056
jonathanpeppers merged 1 commit into
mainfrom
simonrozsival-remove-dead-viewtreeobserver

Conversation

@simonrozsival

Copy link
Copy Markdown
Member

The entire body of src/Mono.Android/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.

This PR:

  • Deletes the dead file src/Mono.Android/Android.Views/ViewTreeObserver.cs.
  • Removes its explicit <Compile Include="Android.Views\ViewTreeObserver.cs" /> entry from Mono.Android.csproj (the project lists sources explicitly, so the entry must be removed too).

Pure dead-code cleanup — no behavioral or API change.

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
Copilot AI review requested due to automatic review settings July 13, 2026 17:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 from Mono.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 jonathanpeppers merged commit bbe27ae into main Jul 14, 2026
43 checks passed
@jonathanpeppers jonathanpeppers deleted the simonrozsival-remove-dead-viewtreeobserver branch July 14, 2026 00:47
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.

3 participants