summaryrefslogtreecommitdiff
path: root/core/java/android/inputmethodservice/InputMethodService.java
diff options
context:
space:
mode:
authorYohei Yukawa <yukawa@google.com>2022-03-08 08:15:03 -0800
committerYohei Yukawa <yukawa@google.com>2022-03-08 08:15:03 -0800
commitc0e93388ffcbce228e2bf5e64e92bbefb17c17dc (patch)
treec2d9fcb47de2d883dc92d2feb1ab32ede64629ff /core/java/android/inputmethodservice/InputMethodService.java
parent54d7eb4497ebd22dfe6a50bf8015b3baad1add9a (diff)
Enable IMS#canImeRenderGesturalNavButtons() by default (3rd try)
This is the third attempt to enable IMS#canImeRenderGesturalNavButtons() by default. The first attempt [1] was reverted due to Bug 217668258. The second attempt [2] was reverted due to Bug 219604375 and Bug 218322263. With this CL, the back button and IME switcher button on the navigation bar are rendered by the IME when gestural navigation mode is enabled. The new behavior can still be manually disabled as follows adb root adb shell setprop \ persist.sys.ime.can_render_gestural_nav_buttons false adb reboot The only observable behavior change we are aware of is that now those buttons are included in the task screenshot in Recents. Other than that, there should be no observable behavior change. [1]: I45e511f5cfec93cdd002d23c091b4fe735b28227 793e15271306d84451733363818e83e661112d44 [2]: I39f454a2d41d7d5255b8cc4f7d9a3f7a7642b2f3 f21d2115594e36b6ee290c4642b246eb776ae3cb Fix: 215545985 Test: Manually tested with ThemedNavBarKeyboard sample 1. Build aosp_coral-userdebug and flash it 2. Enable gesture navigation mode. 3. make -j ThemedNavBarKeyboard 4. adb install -r \ $OUT/system/app/ThemedNavBarKeyboard/ThemedNavBarKeyboard.apk 5. adb shell ime enable \ com.example.android.themednavbarkeyboard/.ThemedNavBarKeyboard 6. adb shell ime set \ com.example.android.themednavbarkeyboard/.ThemedNavBarKeyboard 7. Open the Dialer app 8. Tap "EXTENDED LIGHT NAVIGARION BAR" mode 9. Make sure that the navigation button color is optimized for light navigation bar. 10. Tap "STANDARD LIGHT NAVIGARION BAR" mode 11. Make sure that the navigation button color is optimized for light navigation bar. 12. Tap "FLOATING MODE" mode 13. Make sure that the navigation buttons are visible. Test: Manually verified as follows. 1. Build coral-userdebug and flash it 2. Make sure that the back button is shown on the setup wizard no matter whether the IME is shown or not. Test: Manually verified as follows. 1. Build aosp_coral-userdebug then flash it. 2. adb root 3. adb shell setprop persist.sys.ime.can_render_gestural_nav_buttons true 4. adb reboot 5. adb install -r TestDPC-normalv8001.apk 6. adb shell am start -n com.afwsamples.testdpc/.SetupManagementLaunchActivity 7. Set up work-profile 8. make -j EditTextVariations 9. adb install -r \ $ANDROID_TARGET_OUT_TESTCASES/EditTextVariations/arm64/EditTextVariations.apk 10. adb shell am start --user 0 -n \ com.android.inputmethod.tools.edittextvariations/.EditTextVariations 11. adb shell dumpsys input_method | grep mNavigation -> "mNavigationBarController={mImeDrawsImeNavBar=false, ..." 12. Enable gesture navigation 13. adb shell dumpsys input_method | grep mNavigation -> "mNavigationBarController={mImeDrawsImeNavBar=true, ..." 14. adb shell am start --user 10 -n \ com.android.inputmethod.tools.edittextvariations/.EditTextVariations 15. adb shell dumpsys input_method | grep mNavigation -> "mNavigationBarController={mImeDrawsImeNavBar=true, ..." Change-Id: Iec55ce12e8198e243cdd716ab7c52d0f3939c279
Diffstat (limited to 'core/java/android/inputmethodservice/InputMethodService.java')
-rw-r--r--core/java/android/inputmethodservice/InputMethodService.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/java/android/inputmethodservice/InputMethodService.java b/core/java/android/inputmethodservice/InputMethodService.java
index 60cd4181e933..656aea18fe50 100644
--- a/core/java/android/inputmethodservice/InputMethodService.java
+++ b/core/java/android/inputmethodservice/InputMethodService.java
@@ -348,7 +348,7 @@ public class InputMethodService extends AbstractInputMethodService {
*/
@AnyThread
public static boolean canImeRenderGesturalNavButtons() {
- return SystemProperties.getBoolean(PROP_CAN_RENDER_GESTURAL_NAV_BUTTONS, false);
+ return SystemProperties.getBoolean(PROP_CAN_RENDER_GESTURAL_NAV_BUTTONS, true);
}
/**