android4.0鼠标右键返回功能

  1. 鼠标右键返回功能。
  2. frameworksbaseservicesinputInputReader.cpp文件下修改

  3. uint32_t CursorButtonAccumulator::getButtonState() const {
  4.     uint32_t result = 0;
  5.     if (mBtnLeft) {
  6.         result |= AMOTION_EVENT_BUTTON_PRIMARY;
  7.     }
  8.     if (mBtnRight) {
  9.         result |= AMOTION_EVENT_BUTTON_BACK;
  10.     }
  11.     if (mBtnMiddle) {
  12.         result |= AMOTION_EVENT_BUTTON_TERTIARY;
  13.     }
  14.     if (mBtnBack || mBtnSide) {
  15.         result |= AMOTION_EVENT_BUTTON_BACK;
  16.     }
  17.     if (mBtnForward || mBtnExtra) {
  18.         result |= AMOTION_EVENT_BUTTON_FORWARD;
  19.     }
  20.     return result;



你可能感兴趣的:(A10_android4.0)