Java 类android.view.KeyCharacterMap.KeyData 实例源码

项目:boohee_v5.6    文件:MenuBuilder.java   
void findItemsWithShortcutForKey(List<MenuItemImpl> items, int keyCode, KeyEvent event) {
    boolean qwerty = isQwertyMode();
    int metaState = event.getMetaState();
    KeyData possibleChars = new KeyData();
    if (event.getKeyData(possibleChars) || keyCode == 67) {
        int N = this.mItems.size();
        for (int i = 0; i < N; i++) {
            MenuItemImpl item = (MenuItemImpl) this.mItems.get(i);
            if (item.hasSubMenu()) {
                ((MenuBuilder) item.getSubMenu()).findItemsWithShortcutForKey(items, keyCode, event);
            }
            char shortcutChar = qwerty ? item.getAlphabeticShortcut() : item.getNumericShortcut();
            if ((metaState & 5) == 0 && shortcutChar != '\u0000' && ((shortcutChar == possibleChars.meta[0] || shortcutChar == possibleChars.meta[2] || (qwerty && shortcutChar == '\b' && keyCode == 67)) && item.isEnabled())) {
                items.add(item);
            }
        }
    }
}
项目:boohee_v5.6    文件:MenuBuilder.java   
MenuItemImpl findItemWithShortcutForKey(int keyCode, KeyEvent event) {
    ArrayList<MenuItemImpl> items = this.mTempShortcutItemList;
    items.clear();
    findItemsWithShortcutForKey(items, keyCode, event);
    if (items.isEmpty()) {
        return null;
    }
    int metaState = event.getMetaState();
    KeyData possibleChars = new KeyData();
    event.getKeyData(possibleChars);
    int size = items.size();
    if (size == 1) {
        return (MenuItemImpl) items.get(0);
    }
    boolean qwerty = isQwertyMode();
    for (int i = 0; i < size; i++) {
        MenuItemImpl item = (MenuItemImpl) items.get(i);
        char shortcutChar = qwerty ? item.getAlphabeticShortcut() : item.getNumericShortcut();
        if ((shortcutChar == possibleChars.meta[0] && (metaState & 2) == 0) || ((shortcutChar == possibleChars.meta[2] && (metaState & 2) != 0) || (qwerty && shortcutChar == '\b' && keyCode == 67))) {
            return item;
        }
    }
    return null;
}
项目:solved-hacking-problem    文件:C0264i.java   
void m2114a(List list, int i, KeyEvent keyEvent) {
    boolean b = m2124b();
    int metaState = keyEvent.getMetaState();
    KeyData keyData = new KeyData();
    if (keyEvent.getKeyData(keyData) || i == 67) {
        int size = this.f966j.size();
        for (int i2 = 0; i2 < size; i2++) {
            C0272m c0272m = (C0272m) this.f966j.get(i2);
            if (c0272m.hasSubMenu()) {
                ((C0264i) c0272m.getSubMenu()).m2114a(list, i, keyEvent);
            }
            char alphabeticShortcut = b ? c0272m.getAlphabeticShortcut() : c0272m.getNumericShortcut();
            if ((metaState & 5) == 0 && alphabeticShortcut != '\u0000' && ((alphabeticShortcut == keyData.meta[0] || alphabeticShortcut == keyData.meta[2] || (b && alphabeticShortcut == '\b' && i == 67)) && c0272m.isEnabled())) {
                list.add(c0272m);
            }
        }
    }
}
项目:solved-hacking-problem    文件:C0264i.java   
void m2114a(List list, int i, KeyEvent keyEvent) {
    boolean b = m2124b();
    int metaState = keyEvent.getMetaState();
    KeyData keyData = new KeyData();
    if (keyEvent.getKeyData(keyData) || i == 67) {
        int size = this.f966j.size();
        for (int i2 = 0; i2 < size; i2++) {
            C0272m c0272m = (C0272m) this.f966j.get(i2);
            if (c0272m.hasSubMenu()) {
                ((C0264i) c0272m.getSubMenu()).m2114a(list, i, keyEvent);
            }
            char alphabeticShortcut = b ? c0272m.getAlphabeticShortcut() : c0272m.getNumericShortcut();
            if ((metaState & 5) == 0 && alphabeticShortcut != '\u0000' && ((alphabeticShortcut == keyData.meta[0] || alphabeticShortcut == keyData.meta[2] || (b && alphabeticShortcut == '\b' && i == 67)) && c0272m.isEnabled())) {
                list.add(c0272m);
            }
        }
    }
}
项目:solved-hacking-problem    文件:C0264i.java   
C0272m m2105a(int i, KeyEvent keyEvent) {
    List list = this.f978v;
    list.clear();
    m2114a(list, i, keyEvent);
    if (list.isEmpty()) {
        return null;
    }
    int metaState = keyEvent.getMetaState();
    KeyData keyData = new KeyData();
    keyEvent.getKeyData(keyData);
    int size = list.size();
    if (size == 1) {
        return (C0272m) list.get(0);
    }
    boolean b = m2124b();
    for (int i2 = 0; i2 < size; i2++) {
        C0272m c0272m = (C0272m) list.get(i2);
        char alphabeticShortcut = b ? c0272m.getAlphabeticShortcut() : c0272m.getNumericShortcut();
        if (alphabeticShortcut == keyData.meta[0] && (metaState & 2) == 0) {
            return c0272m;
        }
        if (alphabeticShortcut == keyData.meta[2] && (metaState & 2) != 0) {
            return c0272m;
        }
        if (b && alphabeticShortcut == '\b' && i == 67) {
            return c0272m;
        }
    }
    return null;
}
项目:solved-hacking-problem    文件:C0264i.java   
C0272m m2105a(int i, KeyEvent keyEvent) {
    List list = this.f978v;
    list.clear();
    m2114a(list, i, keyEvent);
    if (list.isEmpty()) {
        return null;
    }
    int metaState = keyEvent.getMetaState();
    KeyData keyData = new KeyData();
    keyEvent.getKeyData(keyData);
    int size = list.size();
    if (size == 1) {
        return (C0272m) list.get(0);
    }
    boolean b = m2124b();
    for (int i2 = 0; i2 < size; i2++) {
        C0272m c0272m = (C0272m) list.get(i2);
        char alphabeticShortcut = b ? c0272m.getAlphabeticShortcut() : c0272m.getNumericShortcut();
        if (alphabeticShortcut == keyData.meta[0] && (metaState & 2) == 0) {
            return c0272m;
        }
        if (alphabeticShortcut == keyData.meta[2] && (metaState & 2) != 0) {
            return c0272m;
        }
        if (b && alphabeticShortcut == '\b' && i == 67) {
            return c0272m;
        }
    }
    return null;
}
项目:FMTech    文件:MenuBuilder.java   
private MenuItemImpl findItemWithShortcutForKey(int paramInt, KeyEvent paramKeyEvent)
{
  ArrayList localArrayList = this.mTempShortcutItemList;
  localArrayList.clear();
  findItemsWithShortcutForKey(localArrayList, paramInt, paramKeyEvent);
  if (localArrayList.isEmpty()) {}
  for (;;)
  {
    return null;
    int i = paramKeyEvent.getMetaState();
    KeyCharacterMap.KeyData localKeyData = new KeyCharacterMap.KeyData();
    paramKeyEvent.getKeyData(localKeyData);
    int j = localArrayList.size();
    if (j == 1) {
      return (MenuItemImpl)localArrayList.get(0);
    }
    boolean bool = isQwertyMode();
    for (int k = 0; k < j; k++)
    {
      MenuItemImpl localMenuItemImpl = (MenuItemImpl)localArrayList.get(k);
      if (bool) {}
      for (int m = localMenuItemImpl.getAlphabeticShortcut(); ((m == localKeyData.meta[0]) && ((i & 0x2) == 0)) || ((m == localKeyData.meta[2]) && ((i & 0x2) != 0)) || ((bool) && (m == 8) && (paramInt == 67)); m = localMenuItemImpl.getNumericShortcut()) {
        return localMenuItemImpl;
      }
    }
  }
}
项目:FMTech    文件:xl.java   
private xp a(int paramInt, KeyEvent paramKeyEvent)
{
  ArrayList localArrayList = this.x;
  localArrayList.clear();
  a(localArrayList, paramInt, paramKeyEvent);
  xp localxp;
  if (localArrayList.isEmpty()) {
    localxp = null;
  }
  label181:
  for (;;)
  {
    return localxp;
    int i1 = paramKeyEvent.getMetaState();
    KeyCharacterMap.KeyData localKeyData = new KeyCharacterMap.KeyData();
    paramKeyEvent.getKeyData(localKeyData);
    int i2 = localArrayList.size();
    if (i2 == 1) {
      return (xp)localArrayList.get(0);
    }
    boolean bool = b();
    int i3 = 0;
    if (i3 >= i2) {
      break;
    }
    localxp = (xp)localArrayList.get(i3);
    if (bool) {}
    for (int i4 = localxp.getAlphabeticShortcut();; i4 = localxp.getNumericShortcut())
    {
      if (((i4 == localKeyData.meta[0]) && ((i1 & 0x2) == 0)) || ((i4 == localKeyData.meta[2]) && ((i1 & 0x2) != 0)) || ((bool) && (i4 == 8) && (paramInt == 67))) {
        break label181;
      }
      i3++;
      break;
    }
  }
  return null;
}