diff options
| author | Jules Aguillon | 2022-11-26 15:46:45 +0100 |
|---|---|---|
| committer | Jules Aguillon | 2022-11-26 15:46:45 +0100 |
| commit | 6fb15b3f16a2d1976aae6828ba4d07087e74acf0 (patch) | |
| tree | 7348e674791295f5bb435b8e94bc596ab4b9dbf3 /srcs/juloo.keyboard2 | |
| parent | 9a0e03f644f69c293f130562f373f4cea738712d (diff) | |
| download | unexpected-keyboard-6fb15b3f16a2d1976aae6828ba4d07087e74acf0.tar.gz unexpected-keyboard-6fb15b3f16a2d1976aae6828ba4d07087e74acf0.zip | |
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.
Diffstat (limited to 'srcs/juloo.keyboard2')
| -rw-r--r-- | srcs/juloo.keyboard2/Keyboard2.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/srcs/juloo.keyboard2/Keyboard2.java b/srcs/juloo.keyboard2/Keyboard2.java index 92ff0c1..165fbea 100644 --- a/srcs/juloo.keyboard2/Keyboard2.java +++ b/srcs/juloo.keyboard2/Keyboard2.java @@ -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) |
