Skip to content

Commit 618a01f

Browse files
committed
#1940 fix: improve reliability of clicking pairing code button in Wireless Debugging settings.
1 parent 133023c commit 618a01f

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

base/src/main/java/io/github/sds100/keymapper/base/expertmode/SystemBridgeSetupAssistantController.kt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,13 @@ class SystemBridgeSetupAssistantController @AssistedInject constructor(
7878
)
7979

8080
private val PAIRING_CODE_BUTTON_TEXT_FILTER = arrayOf(
81-
"pairing code", // English
82-
"kode penyambungan", // Indonesian
81+
"six-digit code", // English
82+
"six digit code", // English
83+
"kode enam digit", // Indonesian
84+
"código de seis dígitos", // Spanish (US) and Portuguese (Brazil)
85+
"छह अंकों वाला कोड इस्तेमाल", // Hindi (India)
86+
"шестизначный код", // Russian (Russia)
87+
"من 6 أعداد", // Arabic (Egypt)
8388
)
8489
}
8590

@@ -251,6 +256,7 @@ class SystemBridgeSetupAssistantController @AssistedInject constructor(
251256
// and trying to find the clickable node. This can change subtly between
252257
// Android devices and ROMs.
253258
val textNode = rootNode.findNodeRecursively { node ->
259+
Timber.e(node.text?.toString())
254260
PAIRING_CODE_BUTTON_TEXT_FILTER.any { text -> node.text?.contains(text) == true }
255261
} ?: return
256262

0 commit comments

Comments
 (0)