[3.4.0][魔方] 更改魔方调试模式开启后Toast展示文案
This commit is contained in:
@@ -177,7 +177,7 @@ internal class MoGoMoFangProviderImpl: IMoGoMoFangProvider, OnMoFangDeviceListen
|
||||
override fun onBluetoothKeyBoardCombineClicked(vararg keyCodes: Int) {
|
||||
val keycodesText = keyCodes.joinToString(",") { KeyEvent.keyCodeToString(it).replace("KEYCODE_", "", true) }
|
||||
if (isTest.get()) {
|
||||
showToast("组合键[$keycodesText]触发了")
|
||||
showToast("[$keycodesText]")
|
||||
}
|
||||
try {
|
||||
MoFangAnalyticUtils.track(EVENT_INPUT, mutableMapOf(EVENT_INPUT_SUB_KEYCODE to keycodesText, EVENT_INPUT_SUB_TYPE to "3"))
|
||||
@@ -192,7 +192,8 @@ internal class MoGoMoFangProviderImpl: IMoGoMoFangProvider, OnMoFangDeviceListen
|
||||
|
||||
override fun onBluetoothKeyBoardLongClicked(keyCode: Int) {
|
||||
if (isTest.get()) {
|
||||
showToast("长按键[${KeyEvent.keyCodeToString(keyCode).replace("KEYCODE_", "", true)}]触发了")
|
||||
val key = KeyEvent.keyCodeToString(keyCode).replace("KEYCODE_", "", true)
|
||||
showToast("[$key$key]")
|
||||
}
|
||||
try {
|
||||
MoFangAnalyticUtils.track(EVENT_INPUT, mutableMapOf(EVENT_INPUT_SUB_KEYCODE to keyCode.toString(), EVENT_INPUT_SUB_TYPE to "2"))
|
||||
@@ -210,7 +211,7 @@ internal class MoGoMoFangProviderImpl: IMoGoMoFangProvider, OnMoFangDeviceListen
|
||||
override fun onBluetoothKeyboardClicked(keyCode: Int) {
|
||||
val keycodeText = KeyEvent.keyCodeToString(keyCode)
|
||||
if (isTest.get()) {
|
||||
showToast("单击键[${keycodeText.replace("KEYCODE_", "", true)}]触发了")
|
||||
showToast("[${keycodeText.replace("KEYCODE_", "", true)}]")
|
||||
}
|
||||
try {
|
||||
MoFangAnalyticUtils.track(EVENT_INPUT, mutableMapOf(EVENT_INPUT_SUB_KEYCODE to keyCode.toString(), EVENT_INPUT_SUB_TYPE to "1"))
|
||||
|
||||
Reference in New Issue
Block a user