forked from extern/Unexpected-Keyboard
Stop using deprecated 'shouldOfferSwitchingToNextInputMethod'
This function has been introduced in API 19 and deprecated in API 28. There was no version check for API 19 but instead of adding these, simply remove the feature for API under 28.
This commit is contained in:
parent
9a0e03f644
commit
6fb15b3f16
@ -128,7 +128,10 @@ public class Keyboard2 extends InputMethodService
|
||||
private void refreshSubtypeImm()
|
||||
{
|
||||
InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||
_config.shouldOfferSwitchingToNextInputMethod = imm.shouldOfferSwitchingToNextInputMethod(getConnectionToken());
|
||||
if (VERSION.SDK_INT < 28)
|
||||
_config.shouldOfferSwitchingToNextInputMethod = true;
|
||||
else
|
||||
_config.shouldOfferSwitchingToNextInputMethod = shouldOfferSwitchingToNextInputMethod();
|
||||
if (VERSION.SDK_INT < 12)
|
||||
{
|
||||
// Subtypes won't work well under API level 12 (getExtraValueOf)
|
||||
|
Loading…
Reference in New Issue
Block a user