setShowImeWithHardKeyboard

Shows the soft keyboard while a hardware keyboard is connected, or not, until detach, see setAnimations: Settings › Physical keyboard › Show on-screen keyboard. Input methods that follow it hide the soft keyboard while a hardware keyboard is connected unless it is on (an emulator usually has one); Gboard on an API 34 emulator showed the keyboard either way. With no hardware keyboard it changes nothing. Read back with DeviceInfo.showImeWithHardKeyboard.