Commit 0b51e3c7 by pye52

适配天波机器的按键调节音量(目前发现无法弹出音量调节框)

parent 341a4aca
......@@ -121,14 +121,16 @@ class MainActivity : BaseActivity() {
Log.i(TAG, "keyCode: $keyCode")
// ToastUtils.showLong("keyCode: $keyCode")
when(keyCode) {
KeyEvent.KEYCODE_PAGE_UP -> {
KeyEvent.KEYCODE_PAGE_UP,
KeyEvent.KEYCODE_NUMPAD_ADD -> {
mAudioManager!!.adjustStreamVolume(
AudioManager.STREAM_SYSTEM,
AudioManager.ADJUST_RAISE,
AudioManager.FLAG_SHOW_UI
)
}
KeyEvent.KEYCODE_PAGE_DOWN -> {
KeyEvent.KEYCODE_PAGE_DOWN,
KeyEvent.KEYCODE_NUMPAD_SUBTRACT -> {
mAudioManager!!.adjustStreamVolume(
AudioManager.STREAM_SYSTEM,
AudioManager.ADJUST_LOWER,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment