/packages/inputmethods/LatinIME/native/jni/src/dictionary/utils/ |
D | buffer_with_extendable_buffer.cpp | 26 uint32_t BufferWithExtendableBuffer::readUint(const int size, const int pos) const { in readUint() argument 28 const int posInBuffer = readingPosIsInAdditionalBuffer ? pos - mOriginalBuffer.size() : pos; in readUint() 29 return ByteArrayUtils::readUint(getBuffer(readingPosIsInAdditionalBuffer), size, posInBuffer); in readUint() 32 uint32_t BufferWithExtendableBuffer::readUintAndAdvancePosition(const int size, in readUintAndAdvancePosition() argument 34 const uint32_t value = readUint(size, *pos); in readUintAndAdvancePosition() 35 *pos += size; in readUintAndAdvancePosition() 43 *pos -= mOriginalBuffer.size(); in readCodePointsAndAdvancePosition() 50 *pos += mOriginalBuffer.size(); in readCodePointsAndAdvancePosition() 54 bool BufferWithExtendableBuffer::extend(const int size) { in extend() argument 55 return checkAndPrepareWriting(getTailPosition(), size); in extend() [all …]
|
D | buffer_with_extendable_buffer.h | 49 return mOriginalBuffer.size() + mUsedAdditionalBufferSize; in getTailPosition() 60 return position >= static_cast<int>(mOriginalBuffer.size()); in isInAdditionalBuffer() 73 uint32_t readUint(const int size, const int pos) const; 75 uint32_t readUintAndAdvancePosition(const int size, int *const pos) const; 81 return mOriginalBuffer.size(); in getOriginalBufferSize() 85 return mAdditionalBuffer.size() >= ((mMaxAdditionalBufferSize in isNearSizeLimit() 89 bool extend(const int size); 97 bool writeUint(const uint32_t data, const int size, const int pos); 99 bool writeUintAndAdvancePosition(const uint32_t data, const int size, int *const pos); 118 bool extendBuffer(const size_t size); [all …]
|
/packages/apps/Camera2/src/com/android/camera/settings/ |
D | ResolutionUtil.java | 103 public void add(Size size) { in add() argument 104 sizes.add(size); in add() 107 public int compare(Size size, Size size2) { in add() 110 size.width() * size.height()); in add() 148 List<Size> result = new ArrayList<Size>(sizes.size()); in getDisplayableSizesFromSupported() 166 private static int area(Size size) { in area() argument 167 if (size == null) { in area() 170 return size.width() * size.height(); in area() 187 for (Size size : sizes) { in pickUpToThree() 188 double targetArea = Math.pow(.5, result.size()) * area(largest); in pickUpToThree() [all …]
|
D | SettingsUtil.java | 216 for (Size size : supportedCopy) { in getSelectedCameraPictureSizes() 217 Log.d(TAG, " --> " + size.width() + "x" + size.height() + " " in getSelectedCameraPictureSizes() 218 + ((size.width() * size.height()) / 1000000f) + " - " in getSelectedCameraPictureSizes() 219 + (size.width() / (float) size.height())); in getSelectedCameraPictureSizes() 234 for (Size size : supportedCopy) { in getSelectedCameraPictureSizes() 235 float aspectRatio = size.width() / (float) size.height(); in getSelectedCameraPictureSizes() 238 aspectRatioMatches.add(size); in getSelectedCameraPictureSizes() 245 final List<Size> searchList = (aspectRatioMatches.size() >= 2) ? aspectRatioMatches in getSelectedCameraPictureSizes() 258 } else if (searchList.size() == 1) { in getSelectedCameraPictureSizes() 262 } else if (searchList.size() == 2) { in getSelectedCameraPictureSizes() [all …]
|
/packages/apps/Test/connectivity/sl4n/rapidjson/include/rapidjson/ |
D | allocators.h | 65 void* Malloc(size_t size) { in Malloc() argument 66 if (size) // behavior of malloc(0) is implementation defined. in Malloc() 67 return std::malloc(size); in Malloc() 125 …MemoryPoolAllocator(void *buffer, size_t size, size_t chunkSize = kDefaultChunkCapacity, BaseAlloc… 129 RAPIDJSON_ASSERT(size > sizeof(ChunkHeader)); 131 chunkHead_->capacity = size - sizeof(ChunkHeader); 132 chunkHead_->size = 0; 152 chunkHead_->size = 0; // Clear user buffer in Clear() 169 size_t size = 0; in Size() local 171 size += c->size; in Size() [all …]
|
/packages/apps/UnifiedEmail/src/com/google/android/mail/common/base/ |
D | Preconditions.java | 268 public static int checkElementIndex(int index, int size) { in checkElementIndex() argument 269 return checkElementIndex(index, size, "index"); in checkElementIndex() 286 public static int checkElementIndex(int index, int size, String desc) { in checkElementIndex() argument 288 if (index < 0 || index >= size) { in checkElementIndex() 289 throw new IndexOutOfBoundsException(badElementIndex(index, size, desc)); in checkElementIndex() 294 private static String badElementIndex(int index, int size, String desc) { in badElementIndex() argument 297 } else if (size < 0) { in badElementIndex() 298 throw new IllegalArgumentException("negative size: " + size); in badElementIndex() 300 return format("%s (%s) must be less than size (%s)", desc, index, size); in badElementIndex() 317 public static int checkPositionIndex(int index, int size) { in checkPositionIndex() argument [all …]
|
/packages/inputmethods/LatinIME/native/jni/tests/utils/ |
D | int_array_view_test.cpp | 30 EXPECT_EQ(intVector.size(), intArrayView.size()); in TEST() 31 for (int i = 0; i < static_cast<int>(intVector.size()); ++i) { in TEST() 44 EXPECT_EQ(expectedIndex, intArrayView.size()); in TEST() 51 EXPECT_EQ(ARRAY_SIZE, intArrayView.size()); in TEST() 57 EXPECT_EQ(1u, intArrayView.size()); in TEST() 79 EXPECT_EQ(intArrayView.size(), intArrayView.limit(intArrayView.size()).size()); in TEST() 80 EXPECT_EQ(intArrayView.size(), intArrayView.limit(1000).size()); in TEST() 83 EXPECT_EQ(4u, subView.size()); in TEST() 84 for (size_t i = 0; i < subView.size(); ++i) { in TEST() 93 EXPECT_TRUE(intArrayView.skip(intVector.size()).empty()); in TEST() [all …]
|
/packages/providers/CalendarProvider/tests/src/com/android/providers/calendar/ |
D | ICalendarTest.java | 16 assertEquals(0, prop.getParameterNames().size()); in testAddParameter() 18 assertEquals(1, prop.getParameterNames().size()); in testAddParameter() 20 assertEquals(1, prop.getParameterNames().size()); in testAddParameter() 22 assertEquals(2, prop.getParameterNames().size()); in testAddParameter() 24 assertEquals(2, prop.getParameterNames().size()); in testAddParameter() 26 assertEquals(3, prop.getParameterNames().size()); in testAddParameter() 79 assertEquals(2, component.getPropertyNames().size()); in testParseBasicComponent() 81 assertEquals(2, prop1.getParameterNames().size()); in testParseBasicComponent() 85 assertEquals(2, props.size()); in testParseBasicComponent() 99 assertEquals(2, property.getParameterNames().size()); in testParseQuotedParam() [all …]
|
/packages/apps/UnifiedEmail/src/org/apache/commons/io/input/ |
D | NullInputStream.java | 65 private long size; field in NullInputStream 79 public NullInputStream(long size) { in NullInputStream() argument 80 this(size, true, false); in NullInputStream() 94 public NullInputStream(long size, boolean markSupported, boolean throwEofException) { in NullInputStream() argument 95 this.size = size; in NullInputStream() 115 return size; in getSize() 124 long avail = size - position; in available() 184 if (position == size) { in read() 223 if (position == size) { in read() 228 if (position > size) { in read() [all …]
|
D | NullReader.java | 65 private long size; field in NullReader 79 public NullReader(long size) { in NullReader() argument 80 this(size, true, false); in NullReader() 94 public NullReader(long size, boolean markSupported, boolean throwEofException) { in NullReader() argument 95 this.size = size; in NullReader() 115 return size; in getSize() 168 if (position == size) { in read() 207 if (position == size) { in read() 212 if (position > size) { in read() 213 returnLength = length - (int)(position - size); in read() [all …]
|
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/makedict/ |
D | BinaryDictEncoderUtils.java | 64 int size = CharEncoding.getCharArraySize(characters, codePointToOneByteCodeMap); in getPtNodeCharactersSize() local 65 if (characters.length > 1) size += FormatSpec.PTNODE_TERMINATOR_SIZE; in getPtNodeCharactersSize() 66 return size; in getPtNodeCharactersSize() 89 return BinaryDictIOUtils.getPtNodeCountSize(nodeArray.mData.size()); in getPtNodeCountSize() 100 int size = getNodeHeaderSize(ptNode, codePointToOneByteCodeMap); in getPtNodeMaximumSize() local 103 size += FormatSpec.PTNODE_FREQUENCY_SIZE; in getPtNodeMaximumSize() 105 size += FormatSpec.PTNODE_MAX_ADDRESS_SIZE; // For children address in getPtNodeMaximumSize() 107 size += (FormatSpec.PTNODE_ATTRIBUTE_FLAGS_SIZE in getPtNodeMaximumSize() 109 * ptNode.mBigrams.size(); in getPtNodeMaximumSize() 111 return size; in getPtNodeMaximumSize() [all …]
|
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/util/bluetooth/ |
D | BluetoothScanner.java | 202 int size = 0; in startListening() local 205 for (int ptr = mClients.size() - 1; ptr > -1; ptr--) { in startListening() 213 size = mClients.size(); in startListening() 218 if (size == 1) { in startListening() 230 final int N = mPresentDevices.size(); in startListening() 253 final int size; in stopListening() local 256 for (int ptr = mClients.size() - 1; ptr > -1; ptr--) { in stopListening() 264 size = mClients.size(); in stopListening() 266 if (size == 0) { in stopListening() 286 final int size; in stopNow() local [all …]
|
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/keyboard/internal/ |
D | PointerTrackerQueueTests.java | 69 assertEquals(0, mQueue.size()); in testEmpty() 75 assertEquals(1, mQueue.size()); in testAdd() 78 assertEquals(2, mQueue.size()); in testAdd() 81 assertEquals(3, mQueue.size()); in testAdd() 84 assertEquals(4, mQueue.size()); in testAdd() 97 assertEquals(3, mQueue.size()); in testRemove() 100 assertEquals(2, mQueue.size()); in testRemove() 103 assertEquals(2, mQueue.size()); in testRemove() 106 assertEquals(1, mQueue.size()); in testRemove() 109 assertEquals(0, mQueue.size()); in testRemove() [all …]
|
/packages/apps/Camera2/src/com/android/camera/util/ |
D | DebugBoundsRenderer.java | 32 public static void drawBounds(Canvas canvas, Paint paint, float size, Rect rect) { in drawBounds() argument 33 drawBounds(canvas, paint, size, rect.left, rect.top, rect.right, rect.bottom); in drawBounds() 40 public static void drawBounds(Canvas canvas, Paint paint, float size, RectF rect) { in drawBounds() argument 41 drawBounds(canvas, paint, size, rect.left, rect.top, rect.right, rect.bottom); in drawBounds() 48 public static void drawBounds(Canvas canvas, Paint paint, float size, float x1, float y1, in drawBounds() argument 52 canvas.drawLine(x1, y1, x1 + size, y1, paint); in drawBounds() 54 canvas.drawLine(x1, y1, x1, y1 + size, paint); in drawBounds() 58 canvas.drawLine(x2 - size, y1, x2, y1, paint); in drawBounds() 60 canvas.drawLine(x2, y1, x2, y1 + size, paint); in drawBounds() 64 canvas.drawLine(x2 - size, y2, x2, y2, paint); in drawBounds() [all …]
|
/packages/apps/TV/tests/unit/src/com/android/tv/recommendation/ |
D | RecommenderTest.java | 89 assertEquals(0, mRecommender.recommendChannels().size()); in testRecommendChannels_includeRecommendedOnly_allChannelsHaveNoScore() 90 assertEquals(0, mRecommender.recommendChannels(-5).size()); in testRecommendChannels_includeRecommendedOnly_allChannelsHaveNoScore() 91 assertEquals(0, mRecommender.recommendChannels(0).size()); in testRecommendChannels_includeRecommendedOnly_allChannelsHaveNoScore() 92 assertEquals(0, mRecommender.recommendChannels(3).size()); in testRecommendChannels_includeRecommendedOnly_allChannelsHaveNoScore() 93 assertEquals(0, mRecommender.recommendChannels(4).size()); in testRecommendChannels_includeRecommendedOnly_allChannelsHaveNoScore() 94 assertEquals(0, mRecommender.recommendChannels(5).size()); in testRecommendChannels_includeRecommendedOnly_allChannelsHaveNoScore() 101 assertEquals(4, mRecommender.recommendChannels().size()); in testRecommendChannels_notIncludeRecommendedOnly_allChannelsHaveNoScore() 102 assertEquals(0, mRecommender.recommendChannels(-5).size()); in testRecommendChannels_notIncludeRecommendedOnly_allChannelsHaveNoScore() 103 assertEquals(0, mRecommender.recommendChannels(0).size()); in testRecommendChannels_notIncludeRecommendedOnly_allChannelsHaveNoScore() 104 assertEquals(3, mRecommender.recommendChannels(3).size()); in testRecommendChannels_notIncludeRecommendedOnly_allChannelsHaveNoScore() [all …]
|
/packages/inputmethods/LatinIME/native/dicttoolkit/src/offdevice_intermediate_dict/ |
D | offdevice_intermediate_dict.cpp | 26 if (codePoints.empty() || codePoints.size() > MAX_WORD_LENGTH) { in addWord() 46 for (; i < codePoints.size(); ++i) { in addWordInner() 47 if (i >= ptNodeCodePoints.size()) { in addWordInner() 56 if (codePoints.size() == i && codePoints.size() == ptNodeCodePoints.size()) { in addWordInner() 69 auto newPtNode = codePoints.size() == i in addWordInner() 80 if (codePoints.size() != i) { in addWordInner() 94 for (size_t i = 0; i < codePoints.size();) { in getWordProperty() 102 || codePoints.size() < ptNodeCodePoints.size()) { in getWordProperty() 105 for (size_t j = 1; j < ptNodeCodePoints.size(); ++j) { in getWordProperty() 110 i += ptNodeCodePoints.size(); in getWordProperty() [all …]
|
/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/pipeline/ |
D | ImagePreset.java | 70 for (int i = 0; i < source.mFilters.size(); i++) { in ImagePreset() 104 for (int i = 0; i < mFilters.size(); i++) { in getPositionForRepresentation() 113 for (int i = 0; i < mFilters.size(); i++) { in getFilterRepresentationForType() 122 for (int i = 0; i < mFilters.size(); i++) { in getPositionForType() 175 for (int i = 0; i < mFilters.size(); i++) { in hasModifications() 221 if (preset.mFilters.size() != mFilters.size()) { in same() 230 if (mFilters.size() > 0 || preset.mFilters.size() > 0) { in same() 236 for (int i = 0; i < preset.mFilters.size(); i++) { in same() 254 if (preset.mFilters.size() != mFilters.size()) { in equals() 263 if (mFilters.size() > 0 || preset.mFilters.size() > 0) { in equals() [all …]
|
D | CacheProcessing.java | 57 if (representations.size() != step.representations.size()) { in equals() 60 for (int i = 0; i < representations.size(); i++) { in equals() 73 for (int i = 0; i < filters.size(); i++) { in buildSteps() 88 if (representations.size() > 0) { in getName() 135 if (filters.size() == 0) { in process() 146 if (steps.size() != mSteps.size()) { in process() 158 for (int i = 0; i < steps.size(); i++) { in process() 189 + mSteps.size() + " cacheBitmap: " + cacheBitmap); in process() 195 for (int i = 0; i < mSteps.size(); i++) { in process() 208 for (int i = findBaseImageIndex; i < mSteps.size(); i++) { in process() [all …]
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/keyboard/internal/ |
D | MatrixUtils.java | 47 final float[][] squareMatrix1, final int size) { in findPivotAndSwapRow() argument 50 for (int i = row + 1; i < size; ++i) { in findPivotAndSwapRow() 57 for (int j = 0; j < size; ++j) { in findPivotAndSwapRow() 73 final float[][] squareMatrix1, final int size) throws MatrixOperationFailedException { in sweep() argument 78 for (int j = 0; j < size; ++j) { in sweep() 82 for (int i = 0; i < size; i++) { in sweep() 85 for (int j = row; j < size; ++j) { in sweep() 88 for (int j = 0; j < size; ++j) { in sweep() 103 final int size = squareMatrix.length; in inverse() local 104 if (squareMatrix[0].length != size || inverseMatrix.length != size in inverse() [all …]
|
/packages/apps/UnifiedEmail/src/org/apache/commons/io/ |
D | FilenameUtils.java | 264 int size = filename.length(); in doNormalize() local 265 if (size == 0) { in doNormalize() 273 char[] array = new char[size + 2]; // +1 for possible extra slash, +2 for arraycopy in doNormalize() 285 if (array[size - 1] != SYSTEM_SEPARATOR) { in doNormalize() 286 array[size++] = SYSTEM_SEPARATOR; in doNormalize() 291 for (int i = prefix + 1; i < size; i++) { in doNormalize() 293 System.arraycopy(array, i, array, i - 1, size - i); in doNormalize() 294 size--; in doNormalize() 300 for (int i = prefix + 1; i < size; i++) { in doNormalize() 303 if (i == size - 1) { in doNormalize() [all …]
|
/packages/apps/Dialer/tests/src/com/android/dialer/calllog/ |
D | CallLogGroupBuilderTest.java | 67 assertEquals(0, mFakeGroupCreator.groups.size()); in testAddGroups_NoCalls() 73 assertEquals(1, mFakeGroupCreator.groups.size()); in testAddGroups_OneCall() 80 assertEquals(2, mFakeGroupCreator.groups.size()); in testAddGroups_TwoCallsNotMatching() 88 assertEquals(1, mFakeGroupCreator.groups.size()); in testAddGroups_ThreeCallsMatching() 103 assertEquals(2, mFakeGroupCreator.groups.size()); in testAddGroups_WithPostDialMatching() 107 assertEquals(1, mFakeGroupCreator.groups.size()); in testAddGroups_WithPostDialMatching() 123 assertEquals(2, mFakeGroupCreator.groups.size()); in testAddGroups_WithViaNumberMatching() 127 assertEquals(1, mFakeGroupCreator.groups.size()); in testAddGroups_WithViaNumberMatching() 137 assertEquals(1, mFakeGroupCreator.groups.size()); in testAddGroups_MatchingIncomingAndOutgoing() 242 assertEquals(4, mFakeGroupCreator.groups.size()); in testAddGroups_Separate() [all …]
|
/packages/apps/UnifiedEmail/src/org/apache/commons/io/filefilter/ |
D | SizeFileFilter.java | 44 private final long size; field in SizeFileFilter 55 public SizeFileFilter(long size) { in SizeFileFilter() argument 56 this(size, true); in SizeFileFilter() 68 public SizeFileFilter(long size, boolean acceptLarger) { in SizeFileFilter() argument 69 if (size < 0) { in SizeFileFilter() 72 this.size = size; in SizeFileFilter() 89 boolean smaller = file.length() < size; in accept() 100 return super.toString() + "(" + condition + size + ")";
|
/packages/inputmethods/OpenWnn/src/jp/co/omronsoft/openwnn/ |
D | ComposingText.java | 105 pos = strLayer.size() - 1; in getStrSegment() 107 if (pos >= strLayer.size() || pos < 0) { in getStrSegment() 146 return this.toString(layer, 0, mStringLayer[layer].size() - 1); in toString() 165 if (strUplayer.size() <= 0) { in modifyUpper() 170 strUplayer.add(new StrSegment(toString(layer), 0, mStringLayer[layer].size() - 1)); in modifyUpper() 177 StrSegment last = strUplayer.get(strUplayer.size() - 1); in modifyUpper() 182 modifyUpper(uplayer, strUplayer.size()-1, 1, 1); in modifyUpper() 188 for (int i = 0; i < strUplayer.size(); i++) { in modifyUpper() 236 for (int i = next; i < strUplayer.size(); i++) { in modifyUpper() 248 for (int i = 1; i < strUplayer.size(); i++) { in modifyUpper() [all …]
|
/packages/apps/Calendar/tests/src/com/android/calendar/alerts/ |
D | AlertServiceTest.java | 224 int id = mAlerts.size(); in addAlertRow() 323 + debugStr, expected.mAlertIdsInDigest.length, actual.mNw.size()); in validateNotificationsAndReset() 324 for (int i = 0; i < actual.mNw.size(); i++) { in validateNotificationsAndReset() 356 for (int digestIndex = 0; digestIndex < actual.mNw.size(); digestIndex++) { in printActualNotifications() 743 assertEquals(0, lowPriority.size()); in testProcessQuery_skipDeclinedDismissed() 744 assertEquals(0, mediumPriority.size()); in testProcessQuery_skipDeclinedDismissed() 745 assertEquals(1, highPriority.size()); in testProcessQuery_skipDeclinedDismissed() 770 assertEquals(0, lowPriority.size()); in testProcessQuery_newAlert() 771 assertEquals(0, mediumPriority.size()); in testProcessQuery_newAlert() 772 assertEquals(2, highPriority.size()); in testProcessQuery_newAlert() [all …]
|
/packages/apps/Camera2/src/com/android/camera/data/ |
D | GlideFilmstripManager.java | 63 Integer size = computeEglMaxTextureSize(); in getMaxImageDisplaySize() local 64 if (size == null) { in getMaxImageDisplaySize() 68 } else if (size > MAX_GL_TEXTURE_SIZE) { in getMaxImageDisplaySize() 73 MAX_IMAGE_DISPLAY_SIZE = new Size(size, size); in getMaxImageDisplaySize() 131 Size size = clampSize(original, MAXIMUM_FULL_RES_PIXELS, getMaxImageDisplaySize()); in loadFull() local 137 .override(size.width(), size.height()); in loadFull() 146 Size size = clampSize(original, MAXIMUM_SMOOTH_PIXELS, getMaxImageDisplaySize()); in loadScreen() local 151 .override(size.width(), size.height()); in loadScreen() 161 … Size size = clampSize(MEDIASTORE_THUMB_SIZE, MAXIMUM_SMOOTH_PIXELS, getMaxImageDisplaySize()); in loadMediaStoreThumb() local 167 .override(size.width(), size.height()); in loadMediaStoreThumb() [all …]
|