Repository navigation
feat(display): enable 120Hz high refresh rate on supported displays and guard service unbinding - #2715
Open
smartworldarafath wants to merge 2 commits into
Open
feat(display): enable 120Hz high refresh rate on supported displays and guard service unbinding#2715smartworldarafath wants to merge 2 commits into
smartworldarafath wants to merge 2 commits into
Conversation
…splays and guard service unbinding
…-platform local path handling
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.
What & why
Many modern Android devices support display refresh rates of 90Hz or 120Hz, but by default apps can remain capped at 60Hz unless preferred display modes are explicitly requested on the Window.
This PR adds high refresh rate negotiation to
MainActivity:Display.supportedModes(usingandroid.view.Displayon API 30+ and falling back toWindowManager.defaultDisplayon API 23–29).preferredDisplayModeIdandpreferredRefreshRateonwindow.attributes.onCreate,onAttachedToWindow, andonConfigurationChangedto maintain smooth scrolling and animations across rotation and lifecycle events.unbindServiceinonStopandonDestroywith safe try-catch handling and resets state flags (shouldUnbind = false,mBound = false) to prevent uncaughtIllegalArgumentException: Service not registeredcrashes.NetworkFirstInterceptorTestlocal file URI handling for cross-platform test reliability.Linked issue
Closes #2086
Checklist
Tested via
./gradlew :composeApp:jvmTest(all JVM tests passed green) and verified refresh rate mode selection and service unbind lifecycle handling on Android.