如何为已植根的 Android 设备覆盖 IR 遥控器的电源键?我试过以下
case KeyEvent.KEYCODE_STB_POWER:
Toast.makeText(this, "KEYCODE_STB_POWER key pressed",
Toast.LENGTH_SHORT).show();
return true;
case KeyEvent.KEYCODE_AVR_POWER:
Toast.makeText(this, "KEYCODE_AVR_POWER key pressed",
Toast.LENGTH_SHORT).show();
return true;
case KeyEvent.KEYCODE_TV_POWER:
Toast.makeText(this, "KEYCODE_AVR_POWER key pressed",
Toast.LENGTH_SHORT).show();
return true;
case KeyEvent.KEYCODE_POWER:
Toast.makeText(this, "KEYCODE_POWER key pressed",
Toast.LENGTH_SHORT).show();
return true;
但以上都没有奏效。我错过了什么吗?