Skip to content

Fix: IAM now showing after switching to 3-button-navigation mode #2284

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

Merged
merged 1 commit into from
Apr 25, 2025

Conversation

jinliu9508
Copy link
Contributor

@jinliu9508 jinliu9508 commented Apr 18, 2025

Description

One Line Summary

Fix some IAMs being suppressed under some specific view layouts with the 3 button navigation mode

Details

Motivation

Fix the bug that causes IAM not shown when user is on the 3 button navigation mode.

Scope

The PR changes how we determine if keyboard is currently open by using WindowInsets instead of using a fixed value for the offset of current view height and the screen height. This change will only be available for devices running on Android 11 and up.

Testing

Manual testing

I was unable to reproduce the scenario that prevent IAM from showing. Instead, I tested whether isKeyboardUp returns the correct value with the soft keyboard being open and close.

Devices I tested:

  • Pixel 9 API 35: used imeInsets logic and returned the correct output
  • Pixel 2 API 29: used visible bound height diff and returned the correct output

Both

Affected code checklist

  • Notifications
    • Display
    • Open
    • Push Processing
    • Confirm Deliveries
  • Outcomes
  • Sessions
  • In-App Messaging
  • REST API requests
  • Public API changes

Checklist

Overview

  • I have filled out all REQUIRED sections above
  • PR does one thing
    • If it is hard to explain how any codes changes are related to each other then it most likely needs to be more than one PR
  • Any Public API changes are explained in the PR details and conform to existing APIs

Testing

  • I have included test coverage for these changes, or explained why they are not needed
  • All automated tests pass, or I explained why that is not possible
  • I have personally tested this on my device, or explained why that is not possible

Final pass

  • Code is as readable as possible.
    • Simplify with less code, followed by splitting up code into well named functions and variables, followed by adding comments to the code.
  • I have reviewed this PR myself, ensuring it meets each checklist item
    • WIP (Work In Progress) is ok, but explain what is still in progress and what you would like feedback on. Start the PR title with "WIP" to indicate this.

This change is Reviewable

@jinliu9508 jinliu9508 added the WIP Work In Progress label Apr 18, 2025
@jinliu9508 jinliu9508 requested review from jkasten2 and nan-li April 21, 2025 18:07
@jinliu9508 jinliu9508 removed the WIP Work In Progress label Apr 21, 2025
Copy link
Member

@jkasten2 jkasten2 left a comment

Choose a reason for hiding this comment

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

There is a comment "Does not work for cases when keyboard is full screen.", is this still true with the new API used in this PR?

@jinliu9508 jinliu9508 force-pushed the keyboard-up-detection branch from dffb48c to 3c73250 Compare April 24, 2025 18:57
@jinliu9508 jinliu9508 requested review from nan-li and jkasten2 April 25, 2025 19:08
@jinliu9508 jinliu9508 changed the title fix: use windowInsets for input method detection Fix: use windowInsets for input method detection Apr 25, 2025
@jinliu9508 jinliu9508 changed the title Fix: use windowInsets for input method detection Fix: IAM now showing after switching to 3-button-navigation mode Apr 25, 2025
@jinliu9508 jinliu9508 merged commit c2c2b5a into main Apr 25, 2025
2 checks passed
@jinliu9508 jinliu9508 deleted the keyboard-up-detection branch April 25, 2025 23:06
@jinliu9508 jinliu9508 mentioned this pull request Apr 26, 2025
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.

3 participants