Skip to content

Conversation

liu-wanshun
Copy link

Proposed Changes

  • getWindow() is NonNull ,mWindowis initialized during construction and has not been modified since then.

Testing

Test: override getWindow() in subclass of dialog,no problem.

@JakeWharton
Copy link
Contributor

The place to fix this, if it indeed is worth changing, would be in the framework, not some arbitrary subclass. But keep in mind that the nullability of these methods models the entire history of behavior–not just the current behavior.

@liu-wanshun
Copy link
Author

The place to fix this, if it indeed is worth changing, would be in the framework, not some arbitrary subclass. But keep in mind that the nullability of these methods models the entire history of behavior–not just the current behavior.

@JakeWharton yes,this problem originates from framework, but it is impossible to be null.
image

@liu-wanshun
Copy link
Author

I also submitted a patch for framework.
https://android-review.googlesource.com/c/platform/frameworks/base/+/3428320

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.

2 participants