Skip to content

Commit 551a95d

Browse files
committed
fix: do not automatically select the key mapper keyboard when the accessibility service starts
1 parent 13a1d0c commit 551a95d

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
## [3.1.1](https://github.com/sds100/KeyMapper/releases/tag/v3.1.1)
2+
3+
#### TO BE RELEASED
4+
5+
## Bug fixes
6+
7+
- Do not automatically select the key mapper keyboard when the accessibility service starts.
8+
19
## [3.1.0](https://github.com/sds100/KeyMapper/releases/tag/v3.1.0)
210

311
#### 10 May 2025

app/src/main/java/io/github/sds100/keymapper/system/accessibility/MyAccessibilityService.kt

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@ import androidx.lifecycle.LifecycleRegistry
2222
import androidx.savedstate.SavedStateRegistry
2323
import androidx.savedstate.SavedStateRegistryController
2424
import androidx.savedstate.SavedStateRegistryOwner
25-
import io.github.sds100.keymapper.Constants
2625
import io.github.sds100.keymapper.R
27-
import io.github.sds100.keymapper.ServiceLocator
2826
import io.github.sds100.keymapper.actions.pinchscreen.PinchScreenType
2927
import io.github.sds100.keymapper.api.IKeyEventRelayServiceCallback
3028
import io.github.sds100.keymapper.api.KeyEventRelayService
@@ -40,7 +38,6 @@ import io.github.sds100.keymapper.util.InputEventType
4038
import io.github.sds100.keymapper.util.MathUtils
4139
import io.github.sds100.keymapper.util.Result
4240
import io.github.sds100.keymapper.util.Success
43-
import io.github.sds100.keymapper.util.onSuccess
4441
import kotlinx.coroutines.flow.Flow
4542
import kotlinx.coroutines.flow.MutableStateFlow
4643
import kotlinx.coroutines.flow.update
@@ -202,14 +199,6 @@ class MyAccessibilityService :
202199

203200
override fun onServiceConnected() {
204201
super.onServiceConnected()
205-
val inputMethodAdapter = ServiceLocator.inputMethodAdapter(this)
206-
207-
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
208-
inputMethodAdapter.getInfoByPackageName(Constants.PACKAGE_NAME).onSuccess {
209-
softKeyboardController.setInputMethodEnabled(it.id, true)
210-
softKeyboardController.switchToInputMethod(it.id)
211-
}
212-
}
213202

214203
Timber.i("Accessibility service: onServiceConnected")
215204
lifecycleRegistry.currentState = Lifecycle.State.STARTED

0 commit comments

Comments
 (0)