With this CL, ThemedNavBarKeyboard sameple IME will have an explicitly
set targetSdkVersion=31 so that it can be installed on older version
of Android OSes.
This CL also explicitly sets "android:exported", which has been
required in AndroidManifest.xml since API 31.
Fix: 211463997
Test: Manually verified as follows
1. Flash SQ1A.211205.008 aosp_coral-userdebug into coral
2. make -j ThemedNavBarKeyboard
3. adb install -r $ANDROID_PRODUCT_OUT/system/app/ThemedNavBarKeyboard/ThemedNavBarKeyboard.apk
Change-Id: Idd88031a6b65cca58add8abe42794bc5f01b1973
This CL adds a sample IME that demonstrates how an IME can now control
the appearance of bottom navigation bar like typical Activities can
do.
This sample IME covers the following 3 use cases to control the
appearance of bottom navigation bar.
A. (Bottom) navigation bar has solid background color.
Like typical Activities, IMEs can
- call Window#setNavigationBarColor() to change the background
color. (Bug 25706186)
- set SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR to tell the SysUI to
optimize the navigation bar button colors. (Bug 69002467)
B. (Bottom) navigation background is seamlessly extended from the main
InputView of the IME, like typical Activities can do with
SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION. Note that essentially this
is a super set of the mode A, because IMEs (and apps) can also fill
the navigation bar region with a solid color in this mode.
C. The appearance of (bottom) navigation bar is controlled by the
target application, not by the IME.
- This is useful for floating IME (Bug 22564251).
Bug: 25706186
Bug: 69002467
Test: Build and manually test as follows.
1. make -j ThemedNavBarKeyboard
2. adb install -r $OUT/system/app/ThemedNavBarKeyboard/ThemedNavBarKeyboard.apk
3. adb shell ime enable com.example.android.themednavbarkeyboard/.ThemedNavBarKeyboard
4. adb shell ime set com.example.android.themednavbarkeyboard/.ThemedNavBarKeyboard
Change-Id: I4b10a19641bd3ce6c43e7629404b6f202d4186e8