/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/utils/ |
D | ScriptUtils.java | 81 public static boolean isLetterPartOfScript(final int codePoint, final int scriptId) { in isLetterPartOfScript() argument 90 return (codePoint >= 0x600 && codePoint <= 0x6FF) in isLetterPartOfScript() 91 || (codePoint >= 0x750 && codePoint <= 0x7BF) in isLetterPartOfScript() 92 || (codePoint >= 0x8A0 && codePoint <= 0x8FF) in isLetterPartOfScript() 93 || (codePoint >= 0xFB50 && codePoint <= 0xFDFF) in isLetterPartOfScript() 94 || (codePoint >= 0xFE70 && codePoint <= 0xFEFF); in isLetterPartOfScript() 99 return (codePoint >= 0x530 && codePoint <= 0x58F in isLetterPartOfScript() 100 || codePoint >= 0xFB13 && codePoint <= 0xFB17); in isLetterPartOfScript() 103 return (codePoint >= 0x980 && codePoint <= 0x9FF); in isLetterPartOfScript() 108 return codePoint >= 0x400 && codePoint <= 0x52F && Character.isLetter(codePoint); in isLetterPartOfScript() [all …]
|
D | DictionaryInfoUtils.java | 124 private static boolean isFileNameCharacter(int codePoint) { in isFileNameCharacter() argument 125 if (codePoint >= 0x30 && codePoint <= 0x39) return true; // Digit in isFileNameCharacter() 126 if (codePoint >= 0x41 && codePoint <= 0x5A) return true; // Uppercase in isFileNameCharacter() 127 if (codePoint >= 0x61 && codePoint <= 0x7A) return true; // Lowercase in isFileNameCharacter() 128 return codePoint == '_'; // Underscore in isFileNameCharacter() 145 final int codePoint = name.codePointAt(i); in replaceFileNameDangerousCharacters() local 146 if (DictionaryInfoUtils.isFileNameCharacter(codePoint)) { in replaceFileNameDangerousCharacters() 147 sb.appendCodePoint(codePoint); in replaceFileNameDangerousCharacters() 150 codePoint)); in replaceFileNameDangerousCharacters() local 185 final int codePoint = fname.codePointAt(i); in getWordListIdFromFileName() local [all …]
|
D | CapsModeUtils.java | 75 private static boolean isStartPunctuation(final int codePoint) { in isStartPunctuation() argument 76 return (codePoint == Constants.CODE_DOUBLE_QUOTE || codePoint == Constants.CODE_SINGLE_QUOTE in isStartPunctuation() 77 || codePoint == Constants.CODE_INVERTED_QUESTION_MARK in isStartPunctuation() 78 || codePoint == Constants.CODE_INVERTED_EXCLAMATION_MARK in isStartPunctuation() 79 || Character.getType(codePoint) == Character.START_PUNCTUATION); in isStartPunctuation()
|
D | RecapitalizeStatus.java | 186 final int codePoint = mStringBefore.codePointAt(nonWhitespaceStart); in trim() local 187 if (!Character.isWhitespace(codePoint)) break; in trim() 192 final int codePoint = mStringBefore.codePointBefore(nonWhitespaceEnd); in trim() local 193 if (!Character.isWhitespace(codePoint)) break; in trim()
|
/packages/inputmethods/LatinIME/native/jni/src/ |
D | defines.h | 56 const uint32_t codePoint = static_cast<uint32_t>(source[si++]); in intArrayToCharArray() local 57 if (codePoint < 0x7F) { // One byte in intArrayToCharArray() 58 dest[di++] = codePoint; in intArrayToCharArray() 59 } else if (codePoint < 0x7FF) { // Two bytes in intArrayToCharArray() 61 dest[di++] = 0xC0 + (codePoint >> 6); in intArrayToCharArray() 62 dest[di++] = 0x80 + (codePoint & 0x3F); in intArrayToCharArray() 63 } else if (codePoint < 0xFFFF) { // Three bytes in intArrayToCharArray() 65 dest[di++] = 0xE0 + (codePoint >> 12); in intArrayToCharArray() 66 dest[di++] = 0x80 + ((codePoint >> 6) & 0x3F); in intArrayToCharArray() 67 dest[di++] = 0x80 + (codePoint & 0x3F); in intArrayToCharArray() [all …]
|
/packages/inputmethods/LatinIME/common/src/com/android/inputmethod/latin/common/ |
D | StringUtils.java | 118 public static String newSingleCodePointString(final int codePoint) { in newSingleCodePointString() argument 119 if (Character.charCount(codePoint) == 1) { in newSingleCodePointString() 122 return String.valueOf((char) codePoint); in newSingleCodePointString() 125 return new String(Character.toChars(codePoint)); in newSingleCodePointString() 284 final int codePoint = Character.codePointAt(charSequence, index); in copyCodePointsAndReturnCodePointCount() local 287 destination[destIndex] = downCase ? Character.toLowerCase(codePoint) : codePoint; in copyCodePointsAndReturnCodePointCount() 340 final int codePoint = text.codePointAt(index); in getCapitalizationType() local 341 if (Character.isUpperCase(codePoint)) { in getCapitalizationType() 344 } else if (Character.isLetter(codePoint)) { in getCapitalizationType() 361 final int codePoint = text.codePointAt(i); in isIdenticalAfterUpcase() local [all …]
|
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/makedict/ |
D | BinaryDictDecoderUtils.java | 123 int codePoint = character; in fitsOnOneByte() local 126 codePoint = codePointToOneByteCodeMap.get(character); in fitsOnOneByte() 129 return codePoint >= FormatSpec.MINIMAL_ONE_BYTE_CHARACTER_VALUE in fitsOnOneByte() 130 && codePoint <= FormatSpec.MAXIMAL_ONE_BYTE_CHARACTER_VALUE; in fitsOnOneByte() 180 for (int codePoint : codePoints) { in writeCharArray() 182 if (codePointToOneByteCodeMap.containsKey(codePoint)) { in writeCharArray() 184 codePoint = codePointToOneByteCodeMap.get(codePoint); in writeCharArray() 187 if (1 == getCharSize(codePoint, codePointToOneByteCodeMap)) { in writeCharArray() 188 buffer[index++] = (byte)codePoint; in writeCharArray() 190 buffer[index++] = (byte)(0xFF & (codePoint >> 16)); in writeCharArray() [all …]
|
/packages/inputmethods/LatinIME/native/dicttoolkit/src/utils/ |
D | utf8_utils.cpp | 38 int codePoint = 0; in getCodePoints() local 47 codePoint = maskFirstByte(c, remainingByteCountForCurrentCodePoint); in getCodePoints() 49 codePoint <<= CODE_POINT_BIT_COUNT_IN_TRAILING_BYTE; in getCodePoints() 50 codePoint += maskTrailingByte(c); in getCodePoints() 54 if (codePoint <= MAX_ENCODED_CODE_POINT_VALUES[currentCodePointSequenceSize - 1]) { in getCodePoints() 56 currentCodePointSequenceSize, codePoint); in getCodePoints() 59 codePoints.push_back(codePoint); in getCodePoints() 86 for (const int codePoint : codePoints) { in getUtf8String() local 87 const int sequenceSize = getSequenceSizeToEncodeCodePoint(codePoint); in getUtf8String() 89 AKLOGE("Cannot encode code point (%d).", codePoint); in getUtf8String() [all …]
|
/packages/inputmethods/LatinIME/native/jni/src/dictionary/utils/ |
D | byte_array_utils.h | 189 int codePoint = readCodePointAndAdvancePosition(buffer, codePointTable, pos); in readStringAndAdvancePosition() local 190 while (NOT_A_CODE_POINT != codePoint && length < maxLength) { in readStringAndAdvancePosition() 191 outBuffer[length++] = codePoint; in readStringAndAdvancePosition() 192 codePoint = readCodePointAndAdvancePosition(buffer, codePointTable, pos); in readStringAndAdvancePosition() 201 int codePoint = readCodePointAndAdvancePosition(buffer, nullptr /* codePointTable */, pos); in advancePositionToBehindString() local 202 while (NOT_A_CODE_POINT != codePoint && length < maxLength) { in advancePositionToBehindString() 203 codePoint = readCodePointAndAdvancePosition(buffer, nullptr /* codePointTable */, pos); in advancePositionToBehindString() 216 const int codePoint = codePoints[i]; in writeCodePointsAndAdvancePosition() local 217 if (codePoint == NOT_A_CODE_POINT || codePoint == CHARACTER_ARRAY_TERMINATOR) { in writeCodePointsAndAdvancePosition() 219 } else if (codePoint < MINIMUM_ONE_BYTE_CHARACTER_VALUE in writeCodePointsAndAdvancePosition() [all …]
|
/packages/apps/Dialer/java/com/android/contacts/common/util/ |
D | SearchUtil.java | 86 final int codePoint = Character.codePointAt(substring, i); in contains() local 87 substringCodePoints[substringLength] = codePoint; in contains() 89 i += Character.charCount(codePoint); in contains() 127 final int codePoint = line.codePointAt(index); in findNextTokenStart() local 128 if (!Character.isLetterOrDigit(codePoint)) { in findNextTokenStart() 131 index += Character.charCount(codePoint); in findNextTokenStart() 139 final int codePoint = line.codePointAt(index); in findNextTokenStart() local 140 if (Character.isLetterOrDigit(codePoint)) { in findNextTokenStart() 143 index += Character.charCount(codePoint); in findNextTokenStart() 159 int codePoint = query.codePointAt(start); in cleanStartAndEndOfSearchQuery() local [all …]
|
/packages/apps/Contacts/src/com/android/contacts/util/ |
D | SearchUtil.java | 103 final int codePoint = Character.codePointAt(substring, i); in contains() local 104 substringCodePoints[substringLength] = codePoint; in contains() 106 i += Character.charCount(codePoint); in contains() 144 final int codePoint = line.codePointAt(index); in findNextTokenStart() local 145 if (!Character.isLetterOrDigit(codePoint)) { in findNextTokenStart() 148 index += Character.charCount(codePoint); in findNextTokenStart() 156 final int codePoint = line.codePointAt(index); in findNextTokenStart() local 157 if (Character.isLetterOrDigit(codePoint)) { in findNextTokenStart() 160 index += Character.charCount(codePoint); in findNextTokenStart() 176 int codePoint = query.codePointAt(start); in cleanStartAndEndOfSearchQuery() local [all …]
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/event/ |
D | Event.java | 114 private Event(final int type, final CharSequence text, final int codePoint, final int keyCode, in Event() argument 119 mCodePoint = codePoint; in Event() 142 public static Event createSoftwareKeypressEvent(final int codePoint, final int keyCode, in createSoftwareKeypressEvent() argument 144 return new Event(EVENT_TYPE_INPUT_KEYPRESS, null /* text */, codePoint, keyCode, x, y, in createSoftwareKeypressEvent() 149 public static Event createHardwareKeypressEvent(final int codePoint, final int keyCode, in createHardwareKeypressEvent() argument 151 return new Event(EVENT_TYPE_INPUT_KEYPRESS, null /* text */, codePoint, keyCode, in createHardwareKeypressEvent() 159 public static Event createDeadEvent(final int codePoint, final int keyCode, final Event next) { in createDeadEvent() argument 161 return new Event(EVENT_TYPE_INPUT_KEYPRESS, null /* text */, codePoint, keyCode, in createDeadEvent() 174 public static Event createEventForCodePointFromUnknownSource(final int codePoint) { in createEventForCodePointFromUnknownSource() argument 176 return new Event(EVENT_TYPE_INPUT_KEYPRESS, null /* text */, codePoint, NOT_A_KEY_CODE, in createEventForCodePointFromUnknownSource() [all …]
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/inputlogic/ |
D | InputLogic.java | 765 final int codePoint = event.mCodePoint; in handleNonSpecialCharacterEvent() local 767 if (inputTransaction.mSettingsValues.isWordSeparator(codePoint) in handleNonSpecialCharacterEvent() 768 || Character.getType(codePoint) == Character.OTHER_SYMBOL) { in handleNonSpecialCharacterEvent() 796 final int codePoint = event.mCodePoint; in handleNonSeparatorEvent() local 806 && !settingsValues.isWordConnector(codePoint)) { in handleNonSeparatorEvent() 831 && settingsValues.isWordCodePoint(codePoint) in handleNonSeparatorEvent() 848 isComposingWord = !settingsValues.mSpacingAndPunctuations.isWordConnector(codePoint); in handleNonSeparatorEvent() 869 sendKeyCodePoint(settingsValues, codePoint); in handleNonSeparatorEvent() 882 final int codePoint = event.mCodePoint; in handleSeparatorEvent() local 886 final boolean shouldAvoidSendingCode = Constants.CODE_SPACE == codePoint in handleSeparatorEvent() [all …]
|
/packages/inputmethods/LatinIME/native/jni/src/suggest/core/layout/ |
D | proximity_info_state.cpp | 170 const int inputIndex, const int codePoint) const { in getPointToKeyLength() 171 const int keyId = mProximityInfo->getKeyIndexOf(codePoint); in getPointToKeyLength() 176 if (CharUtils::isIntentionalOmissionCodePoint(codePoint)) { in getPointToKeyLength() 200 ProximityType ProximityInfoState::getProximityType(const int index, const int codePoint, in getProximityType() argument 204 const int baseLowerC = CharUtils::toBaseLowerCase(codePoint); in getProximityType() 208 if (firstCodePoint == baseLowerC || firstCodePoint == codePoint) { in getProximityType() 225 || currentCodePoints[j] == codePoint); in getProximityType() 240 || currentCodePoints[j] == codePoint); in getProximityType() 254 ProximityType ProximityInfoState::getProximityTypeG(const int index, const int codePoint) const { in getProximityTypeG() 262 sampledSearchKeyVectorsSize, codePoint); in getProximityTypeG() [all …]
|
/packages/providers/ContactsProvider/src/com/android/providers/contacts/ |
D | ContactLocaleUtils.java | 210 int codePoint = Character.codePointAt(name, offset); in getBucketIndex() local 213 if (Character.isDigit(codePoint)) { in getBucketIndex() 216 } else if (!Character.isSpaceChar(codePoint) && in getBucketIndex() 217 codePoint != '+' && codePoint != '(' && in getBucketIndex() 218 codePoint != ')' && codePoint != '.' && in getBucketIndex() 219 codePoint != '-' && codePoint != '#') { in getBucketIndex() 222 offset += Character.charCount(codePoint); in getBucketIndex() 340 private static boolean isChineseOrJapanese(int codePoint) { in isChineseOrJapanese() argument 341 return CJ_BLOCKS.contains(UnicodeBlock.of(codePoint)); in isChineseOrJapanese()
|
D | NameSplitter.java | 960 int codePoint = Character.codePointAt(name, offset); in guessFullNameStyle() local 961 if (Character.isLetter(codePoint)) { in guessFullNameStyle() 962 UnicodeBlock unicodeBlock = UnicodeBlock.of(codePoint); in guessFullNameStyle() 969 return guessCJKNameStyle(name, offset + Character.charCount(codePoint)); in guessFullNameStyle() 982 offset += Character.charCount(codePoint); in guessFullNameStyle() 990 int codePoint = Character.codePointAt(name, offset); in guessCJKNameStyle() local 991 if (Character.isLetter(codePoint)) { in guessCJKNameStyle() 992 UnicodeBlock unicodeBlock = UnicodeBlock.of(codePoint); in guessCJKNameStyle() 1000 offset += Character.charCount(codePoint); in guessCJKNameStyle() 1045 int codePoint = Character.codePointAt(name, offset); in guessPhoneticNameStyle() local [all …]
|
/packages/inputmethods/LatinIME/native/jni/src/utils/ |
D | char_utils.h | 52 static AK_FORCE_INLINE bool isIntentionalOmissionCodePoint(const int codePoint) { in isIntentionalOmissionCodePoint() argument 54 return codePoint == KEYCODE_SINGLE_QUOTE || codePoint == KEYCODE_HYPHEN_MINUS; in isIntentionalOmissionCodePoint() 83 static AK_FORCE_INLINE int isInUnicodeSpace(const int codePoint) { in isInUnicodeSpace() argument 84 return codePoint >= MIN_UNICODE_CODE_POINT && codePoint <= MAX_UNICODE_CODE_POINT; in isInUnicodeSpace()
|
D | jni_data_utils.h | 80 const int codePoint = codePoints[i]; in outputCodePoints() local 81 int codePointToOutput = codePoint; in outputCodePoints() 82 if (!CharUtils::isInUnicodeSpace(codePoint)) { in outputCodePoints() 83 if (codePoint == CODE_POINT_BEGINNING_OF_SENTENCE) { in outputCodePoints() 88 } else if (codePoint >= 0x01 && codePoint <= 0x1F) { in outputCodePoints()
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/accessibility/ |
D | KeyCodeDescriptionMapper.java | 266 public String getDescriptionForCodePoint(final Context context, final int codePoint) { in getDescriptionForCodePoint() argument 268 final int index = mKeyCodeMap.indexOfKey(codePoint); in getDescriptionForCodePoint() 272 final String accentedLetter = getSpokenAccentedLetterDescription(context, codePoint); in getDescriptionForCodePoint() 277 final String unsupportedSymbol = getSpokenSymbolDescription(context, codePoint); in getDescriptionForCodePoint() 281 final String emojiDescription = getSpokenEmojiDescription(context, codePoint); in getDescriptionForCodePoint() 285 if (Character.isDefined(codePoint) && !Character.isISOControl(codePoint)) { in getDescriptionForCodePoint() 286 return StringUtils.newSingleCodePointString(codePoint); in getDescriptionForCodePoint() 354 final int codePoint = outputText.codePointAt(index); in getSpokenEmoticonDescription() local 355 sb.append(String.format(Locale.ROOT, SPOKEN_EMOTICON_CODE_POINT_FORMAT, codePoint)); in getSpokenEmoticonDescription()
|
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/ |
D | InputTestsBase.java | 280 protected void typeInternal(final int codePoint, final boolean isKeyRepeat) { in typeInternal() argument 288 final Key key = mKeyboard.getKey(codePoint); in typeInternal() 291 event = Event.createSoftwareKeypressEvent(codePoint, Event.NOT_A_KEY_CODE, in typeInternal() 296 event = LatinIME.createSoftwareKeypressEvent(codePoint, x, y, isKeyRepeat); in typeInternal() 303 protected void type(final int codePoint) { in type() argument 304 typeInternal(codePoint, false /* isKeyRepeat */); in type() 307 protected void repeatKey(final int codePoint) { in repeatKey() argument 308 typeInternal(codePoint, true /* isKeyRepeat */); in repeatKey() 317 protected Point getXY(final int codePoint) { in getXY() argument 318 final Key key = mKeyboard.getKey(codePoint); in getXY()
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/spellcheck/ |
D | SentenceLevelAdapter.java | 95 final int codePoint = Character.codePointAt(sequence, index); in getEndOfWord() 96 if (mSpacingAndPunctuations.isWordSeparator(codePoint)) { in getEndOfWord() 99 if (Constants.CODE_PERIOD == codePoint) { in getEndOfWord() 111 index += Character.charCount(codePoint); in getEndOfWord() 123 final int codePoint = Character.codePointAt(sequence, index); 124 if (!mSpacingAndPunctuations.isWordSeparator(codePoint)) { 127 index += Character.charCount(codePoint);
|
/packages/inputmethods/LatinIME/native/jni/src/suggest/core/dictionary/ |
D | dictionary_utils.cpp | 43 for (const int codePoint : codePoints) { in getMaxProbabilityOfExactMatches() local 45 const int baseLowerCodePoint = CharUtils::toBaseLowerCase(codePoint); in getMaxProbabilityOfExactMatches() 80 const int codePoint = CharUtils::toBaseLowerCase(childDicNode->getNodeCodePoint()); in processChildDicNodes() local 81 if (inputCodePoint == codePoint) { in processChildDicNodes() 92 if (childDicNode->getNodeCodePoint() == codePoint) { in processChildDicNodes()
|
/packages/inputmethods/LatinIME/native/jni/src/suggest/core/dicnode/ |
D | dic_node.h | 130 const int codePoint = in initAsPassingChild() local 133 mDicNodeProperties.init(&parentDicNode->mDicNodeProperties, codePoint); in initAsPassingChild() 335 const int codePoint = mDicNodeProperties.getDicNodeCodePoint(); in getNodeCodePoint() local 339 return codePoint; in getNodeCodePoint() 341 return DigraphUtils::getDigraphCodePointForIndex(codePoint, digraphIndex); in getNodeCodePoint() 436 const int codePoint = mDicNodeState.mDicNodeStateOutput.getCurrentWordCodePointAt(i); in compare() local 439 if (codePoint != rightCodePoint) { in compare() 440 return rightCodePoint > codePoint; in compare()
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/ |
D | RichInputConnection.java | 686 private static boolean isPartOfCompositionForScript(final int codePoint, in isPartOfCompositionForScript() argument 689 return spacingAndPunctuations.isWordConnector(codePoint) in isPartOfCompositionForScript() 691 || (!spacingAndPunctuations.isWordSeparator(codePoint) in isPartOfCompositionForScript() 692 && ScriptUtils.isLetterPartOfScript(codePoint, scriptId)); in isPartOfCompositionForScript() 725 final int codePoint = Character.codePointBefore(before, startIndexInBefore); in getWordRangeAtCursor() local 726 if (!isPartOfCompositionForScript(codePoint, spacingAndPunctuations, scriptId)) { in getWordRangeAtCursor() 730 if (Character.isSupplementaryCodePoint(codePoint)) { in getWordRangeAtCursor() 738 final int codePoint = Character.codePointAt(after, endIndexInAfter); in getWordRangeAtCursor() local 739 if (!isPartOfCompositionForScript(codePoint, spacingAndPunctuations, scriptId)) { in getWordRangeAtCursor() 742 if (Character.isSupplementaryCodePoint(codePoint)) { in getWordRangeAtCursor()
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/keyboard/internal/ |
D | CodesArrayParser.java | 61 final int codePoint = Integer.parseInt(codeInHex, BASE_HEX); in parseLabel() local 62 sb.appendCodePoint(codePoint); in parseLabel() 102 final int codePoint = Integer.parseInt(codeInHex, BASE_HEX); in parseOutputText() local 103 sb.appendCodePoint(codePoint); in parseOutputText()
|