Skip to content
Commit a4f73d7f authored by Charles Chen's avatar Charles Chen
Browse files

Respect UI Context for getDisplay

Before InputMethodService initializes, InputMethodService#getDisplay
will throw UnsupportedOperationException because it doesn't attach to
any display. However, it may make developers confuse about why
throwing exception for an UI context. This CL workarounds to also
check isUiContext flags to make the result of IMS#getDisplay consistent.
It should be considered to remove after IMS migrate to WindowContext
concept.

fixes: 161964893
Test: atest InputMethodServiceTest#testGetDisplayBeforeInitialization

Change-Id: Ie0bda707f0196b45a8851f645da7ecab6814bed6
parent dd5f3cd7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment