-
-
Notifications
You must be signed in to change notification settings - Fork 111
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
fix(android): Replace deprecated APIs for Display, Size, Metrics #11436
Conversation
User Test ResultsTest specification and instructions
Test Artifacts |
Test ResultsGROUP_API_28: Android 9.0 Pie
GROUP_API_34: Android 14.0 UpsideDown Cake
On the Chrome browser: the keyboard disappeared when moving portrait to landscape view. the keyboard appeared when clicking in the search box.
|
@dinakaranr - I retested on emulator and could reproduce what you saw. However, I think that's just the behavior on google.com when you are on the search bar but don't have anything. @keymanapp-test-bot retest GROUP_API_34 TEST_KEYMAN |
Test ResultsGROUP_API_34: Android 14.0 UpsideDown Cake
|
WindowManager wm = (WindowManager) getSystemService(Context.WINDOW_SERVICE); | ||
Point size = new Point(0, 0); | ||
wm.getDefaultDisplay().getSize(size); | ||
Point size = KMManager.getWindowSize(getApplicationContext()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These new API endpoints need to be documented
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will do on help.keyman
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
android/KMEA/app/src/main/java/com/keyman/engine/KMManager.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Marc Durdin <[email protected]>
Changes in this pull request will be available for download in Keyman version 18.0.38-alpha |
Fixes #9586
Android API 30 deprecated several calls used to determine Window Display, Size, and Metrics. This refactors the calls to KMManager to handle the different API calls.
User Testing
Setup
Tests
TEST_KEYMAN - Verifies orientation and keyboard height for Keyman app
TEST_FIRSTVOICES - Verifies orientation and keyboard height for FirstVoices app