Suppress deprecation

This commit is contained in:
J-Jamet
2022-01-26 15:11:11 +01:00
parent 0084d113d3
commit 89a338ac33

View File

@@ -194,7 +194,6 @@ class MagikeyboardService : InputMethodService(), KeyboardView.OnKeyboardActionL
}
}
@Suppress("DEPRECATION")
private fun switchToPreviousKeyboard() {
var imeManager: InputMethodManager? = null
try {
@@ -202,6 +201,7 @@ class MagikeyboardService : InputMethodService(), KeyboardView.OnKeyboardActionL
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
switchToPreviousInputMethod()
} else {
@Suppress("DEPRECATION")
window.window?.let { window ->
imeManager?.switchToLastInputMethod(window.attributes.token)
}