Skip to content
Commit af2e20e1 authored by Yohei Yukawa's avatar Yohei Yukawa
Browse files

Allow IMEs to use light nav bar buttons

Although a recent change [1] finally allowed IMEs to opt out
NavigationGuard to render whatever behind the nav bar buttons, there is
still a limitation that SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR is always
ignored for IME windows.  This CL removes such a limitation.

For SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR to take effect, IMEs need to
explicitly specify FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS, as explained in
JavaDoc.

Depending on the IME design, there are three major supported use cases.

A. IME with custom light navigation bar background:
  In this scenario, the IME should specify the following flags.
  - FLAG_LAYOUT_IN_OVERSCAN
  - FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS
  - SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR
  Then the nav bar button color is optimized for light nav bar.

B. IME with custom dark navigation bar background:
  In this scenario, the IME should specify the following flags.
  - FLAG_LAYOUT_IN_OVERSCAN
  - FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS
  Then the nav bar button color is optimized for dark nav bar.

C. Floating IME without NavigationGuard (e.g. Bug 22564251)
  In this scenario, the IME should specify the following flags.
  - FLAG_LAYOUT_IN_OVERSCAN
  Then the nav bar and its button colors are controlled by the top
  application window.

 [1]: Ic38f204a892bf34e8dae65990d5aa8c95af555d8
      9b32a35a

Bug: 69002565
Fixes: 69002467
Test: android.systemui.cts.LightBarTests
Test: Manually tested with a custom IME for the above three use cases.
Change-Id: I2cecadb82d14564d7019a9636918b06c3bcf433c
parent 94dffbcb
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