Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle errors when fetching screen resolution in Subject (close #657) #664

Merged
merged 3 commits into from
Jan 27, 2024

Conversation

mscwilson
Copy link
Contributor

@mscwilson mscwilson commented Jan 26, 2024

I was unable to replicate the bug reported in #657. However, the stack trace is pretty clear about the problem, which is WindowManager being used with an Application (not Activity) context. The defaultDisplay() and getSize() methods are deprecated also.

This PR replaces WindowManager with a more suitable way of fetching the screen resolution in Subject.

@matus-tomlein matus-tomlein changed the title Remove use of WindowManager (close #657) Handle errors when fetching screen resolution in Subject (close #657) Jan 27, 2024
Copy link
Contributor

@matus-tomlein matus-tomlein left a comment

Choose a reason for hiding this comment

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

LGTM!

Sorry for the extra commit in your PR, just wanted to add a test to see that this works correctly on all the tested API levels.

@mscwilson mscwilson merged commit 334ebbe into release/6.0.0 Jan 27, 2024
3 checks passed
@mscwilson mscwilson deleted the issue/657-application_context_bug branch January 27, 2024 10:17
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