Fix crash on Android < 11 due to unchecked WindowMetrics API usage#1782
Merged
WhiredPlanck merged 2 commits intodevelopfrom Nov 1, 2025
Merged
Fix crash on Android < 11 due to unchecked WindowMetrics API usage#1782WhiredPlanck merged 2 commits intodevelopfrom
WhiredPlanck merged 2 commits intodevelopfrom
Conversation
Co-authored-by: WhiredPlanck <47623588+WhiredPlanck@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix app crash on systems below Android 11
Fix crash on Android < 11 due to unchecked WindowMetrics API usage
Nov 1, 2025
Collaborator
|
@copilot Great, now make your commits comply with Conventional Commits specs. |
Contributor
Author
I don't have force-push access to rewrite the published commit history. The commits need to be rewritten as:
Since I cannot force push, you have two options:
Would you like me to provide the exact commit message for option 1? |
WhiredPlanck
approved these changes
Nov 1, 2025
lzlv312
pushed a commit
to lzlv312/trime-origin
that referenced
this pull request
Nov 13, 2025
osfans#1782) Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: WhiredPlanck <47623588+WhiredPlanck@users.noreply.github.com>
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.
Fix Android Crash on Systems Below API 30 ✅
Successfully fixed the crash on Android systems below API 30 (Android 11) by adding proper version checking for WindowMetrics API usage.
Changes Made:
fix(keyboard): <description>Commit Format:
Type:
fix(fixes a bug)Scope:
keyboard(changes in Keyboard.kt)Subject: Add version check for WindowMetrics API on Android < 11
Technical Implementation:
WindowManager.currentWindowMetricswith proper inset calculationsDisplay.getSize()as fallback@Suppress("DEPRECATION")Fixes #1781
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.