-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Use DisplayCompat.getMode(). #8484
Use DisplayCompat.getMode(). #8484
Conversation
Kudos, SonarCloud Quality Gate passed! |
Please, provide a "why" to your changes when opening PRs. I have no idea what |
Sorry about that, I amended the change description. |
Thank you
Didn't it already work before, or is there an issue this PR fixes? What is the difference in behaviour? |
The documentation mentions that some 4K TVs might have trouble running the framework code, so a workaround is provided in the method. |
According to the Android docs, Display.getSize() does something different than DisplayCompat.getMode().getPhysicalHeight()/display.getMode().getPhysicalHeight(). The first one gets the size of the screen used by the app (so removing system parts), while |
You're right, my bad. The backport implementation calls The documentation recommends using |
I created a separate PR for the change I mentioned here: #8656 |
What is it?
Description of the changes in your PR
DisplayCompat.getMode()
to get the current display mode. This method provides workarounds for retrieving the display size for Android TV devices.APK testing
The APK can be found by going to the "Checks" tab below the title. On the left pane, click on "CI", scroll down to "artifacts" and click "app" to download the zip file which contains the debug APK of this PR.
Due diligence