/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/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/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/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/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/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/tests/src/com/android/inputmethod/keyboard/internal/ |
D | PointerTrackerQueueTests.java | 78 assertEquals(0, mQueue.size()); in testEmpty() 85 assertEquals(1, mQueue.size()); in testAdd() 88 assertEquals(2, mQueue.size()); in testAdd() 91 assertEquals(3, mQueue.size()); in testAdd() 94 assertEquals(4, mQueue.size()); in testAdd() 108 assertEquals(3, mQueue.size()); in testRemove() 111 assertEquals(2, mQueue.size()); in testRemove() 114 assertEquals(2, mQueue.size()); in testRemove() 117 assertEquals(1, mQueue.size()); in testRemove() 120 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/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/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/Settings/src/com/android/settings/wifi/qrcode/ |
D | QrCamera.java | 398 for (Camera.Size size : parameters.getSupportedPreviewSizes()) { in getBestPreviewSize() 399 double ratio = getRatio(size.width, size.height); in getBestPreviewSize() 400 if (size.height * size.width > bestChoice.getWidth() * bestChoice.getHeight() in getBestPreviewSize() 403 bestChoice = new Size(size.width, size.height); in getBestPreviewSize() 404 bestChoiceRatio = getRatio(size.width, size.height); in getBestPreviewSize() 419 for (Camera.Size size : parameters.getSupportedPictureSizes()) { in getBestPictureSize() 420 double ratio = getRatio(size.width, size.height); in getBestPictureSize() 422 bestChoices.add(new Size(size.width, size.height)); in getBestPictureSize() 424 similarChoices.add(new Size(size.width, size.height)); in getBestPictureSize() 428 if (bestChoices.size() == 0 && similarChoices.size() == 0) { in getBestPictureSize() [all …]
|
/packages/apps/Launcher3/src/com/android/launcher3/shortcuts/ |
D | ShortcutDragPreviewProvider.java | 47 int size = Launcher.getLauncher(mView.getContext()).getDeviceProfile().iconSizePx; in createDragBitmap() local 49 size + blurSizeOutline, in createDragBitmap() 50 size + blurSizeOutline, in createDragBitmap() 51 (c) -> drawDragViewOnBackground(c, size)); in createDragBitmap() 60 int size = Launcher.getLauncher(mView.getContext()).getDeviceProfile().iconSizePx; in createDragBitmapLegacy() local 62 size + blurSizeOutline, in createDragBitmapLegacy() 63 size + blurSizeOutline, in createDragBitmapLegacy() 67 canvas.scale(((float) size) / bounds.width(), ((float) size) / bounds.height(), 0, 0); in createDragBitmapLegacy() 73 private void drawDragViewOnBackground(Canvas canvas, float size) { in drawDragViewOnBackground() argument 78 canvas.scale(size / bounds.width(), size / bounds.height(), 0, 0); in drawDragViewOnBackground() [all …]
|
/packages/services/Car/service/src/com/android/car/ |
D | CarServiceUtils.java | 157 final int size = list.size(); in toFloatArray() local 158 final float[] array = new float[size]; in toFloatArray() 159 for (int i = 0; i < size; ++i) { in toFloatArray() 166 final int size = list.size(); in toIntArray() local 167 final int[] array = new int[size]; in toIntArray() 168 for (int i = 0; i < size; ++i) { in toIntArray() 175 final int size = list.size(); in toByteArray() local 176 final byte[] array = new byte[size]; in toByteArray() 177 for (int i = 0; i < size; ++i) { in toByteArray() 231 ArrayList<SyncRunnable> syncs = new ArrayList<>(threads.size()); in finishAllHandlerTasks() [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 …]
|
/packages/providers/MediaProvider/jni/ |
D | RedactionInfo.cpp | 31 int newRangesSize = ranges.size(); in mergeOverlappingRedactionRanges() 32 for (int i = 0; i < ranges.size() - 1; ++i) { in mergeOverlappingRedactionRanges() 42 if (newRangesSize < ranges.size()) { in mergeOverlappingRedactionRanges() 55 bool RedactionInfo::hasOverlapWithReadRequest(size_t size, off64_t off) const { in hasOverlapWithReadRequest() argument 57 off + size < redaction_ranges_.front().first) { in hasOverlapWithReadRequest() 78 int RedactionInfo::size() const { in size() function in mediaprovider::fuse::RedactionInfo 79 return redaction_ranges_.size(); in size() 83 return size() > 0; in isRedactionNeeded() 91 unique_ptr<vector<RedactionRange>> RedactionInfo::getOverlappingRedactionRanges(size_t size, in getOverlappingRedactionRanges() argument 93 if (hasOverlapWithReadRequest(size, off)) { in getOverlappingRedactionRanges() [all …]
|
D | FuseDaemon.cpp | 129 void Record(int fd, size_t size) { SendMessage(Message::record, fd, size); } in Record() argument 138 size_t size; member 141 void RecordImpl(int fd, size_t size) { in RecordImpl() argument 142 total_size_ += size; in RecordImpl() 149 size += old_size->first; in RecordImpl() 156 auto new_size = sizes_.insert(Sizes::value_type(size, fd)); in RecordImpl() 163 auto size = --sizes_.end(); in RecordImpl() local 164 total_size_ -= size->first; in RecordImpl() 165 posix_fadvise(size->second, 0, 0, POSIX_FADV_DONTNEED); in RecordImpl() 166 files_.erase(size->second); in RecordImpl() [all …]
|
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/storagemonitoring/ |
D | IoStatsTrackerTest.java | 49 assertEquals(0, ioStatsTracker.getCurrentSample().size()); in testNewUsersAppear() 50 assertEquals(0, ioStatsTracker.getTotal().size()); in testNewUsersAppear() 65 assertEquals(2, ioStatsTracker.getCurrentSample().size()); in testNewUsersAppear() 66 assertEquals(2, ioStatsTracker.getTotal().size()); in testNewUsersAppear() 92 assertEquals(1, ioStatsTracker.getCurrentSample().size()); in testUserMetricsChange() 93 assertEquals(1, ioStatsTracker.getTotal().size()); in testUserMetricsChange() 124 assertEquals(1, ioStatsTracker.getCurrentSample().size()); in testUpdateNoIoProcessActive() 125 assertEquals(1, ioStatsTracker.getTotal().size()); in testUpdateNoIoProcessActive() 153 assertEquals(0, ioStatsTracker.getCurrentSample().size()); in testUpdateNoIoProcessInactive() 154 assertEquals(1, ioStatsTracker.getTotal().size()); in testUpdateNoIoProcessInactive() [all …]
|
/packages/apps/Nfc/nci/jni/ |
D | HciEventManager.cpp | 60 ScopedLocalRef<jobject> aidJavaArray(e, e->NewByteArray(aid.size())); in notifyTransactionListenersOfAid() 62 e->SetByteArrayRegion((jbyteArray)aidJavaArray.get(), 0, aid.size(), in notifyTransactionListenersOfAid() 69 if (data.size() > 0) { in notifyTransactionListenersOfAid() 70 ScopedLocalRef<jobject> dataJavaArray(e, e->NewByteArray(data.size())); in notifyTransactionListenersOfAid() 72 e->SetByteArrayRegion((jbyteArray)dataJavaArray.get(), 0, data.size(), in notifyTransactionListenersOfAid() 107 if (lengthTag < 0x80 && berTlv.size() == (lengthTag + 1)) { in getDataFromBerTlv() 109 } else if (lengthTag == 0x81 && berTlv.size() > 2) { in getDataFromBerTlv() 111 if ((length + 2) == berTlv.size()) { in getDataFromBerTlv() 114 } else if (lengthTag == 0x82 && berTlv.size() > 3) { in getDataFromBerTlv() 116 if ((length + 3) == berTlv.size()) { in getDataFromBerTlv() [all …]
|
/packages/apps/TV/tests/robotests/src/com/android/tv/dvr/ui/list/ |
D | DvrHistoryRowAdapterTest.java | 123 assertThat(mDvrHistoryRowAdapter.size()).isEqualTo(7); in testOnScheduledRecordingAdded_existingHeader() 140 assertThat(mDvrHistoryRowAdapter.size()).isEqualTo(8); in testOnScheduledRecordingAdded_newHeader_addOldest() 157 assertThat(mDvrHistoryRowAdapter.size()).isEqualTo(8); in testOnScheduledRecordingAdded_newHeader_addBetween() 174 assertThat(mDvrHistoryRowAdapter.size()).isEqualTo(8); in testOnScheduledRecordingAdded_newHeader_addNewest() 185 assertThat(mDvrHistoryRowAdapter.size()).isEqualTo(7); in testOnScheduledRecordingAdded_addRecordedProgram() 196 assertThat(mDvrHistoryRowAdapter.size()).isEqualTo(5); in testOnScheduledRecordingRemoved_keepHeader() 208 assertThat(mDvrHistoryRowAdapter.size()).isEqualTo(3); in testOnScheduledRecordingRemoved_removeHeader() 217 assertThat(mDvrHistoryRowAdapter.size()).isEqualTo(7); in testOnScheduledRecordingRemoved_removeRecordedProgram() 224 assertThat(mDvrHistoryRowAdapter.size()).isEqualTo(6); in testOnScheduledRecordingRemoved_removeRecordedProgram() 250 int size = 0; in getScheduleSize() local [all …]
|
/packages/services/Car/computepipe/tests/runner/client_interface/ |
D | PipeOptionsConverterTest.cpp | 86 ASSERT_EQ(desc.inputConfig.size(), 6); in TEST() 87 ASSERT_EQ(desc.inputConfig[0].inputSources.size(), 1); in TEST() 93 ASSERT_EQ(desc.inputConfig[1].inputSources.size(), 1); in TEST() 99 ASSERT_EQ(desc.inputConfig[2].inputSources.size(), 1); in TEST() 105 ASSERT_EQ(desc.inputConfig[3].inputSources.size(), 1); in TEST() 111 ASSERT_EQ(desc.inputConfig[4].inputSources.size(), 1); in TEST() 117 ASSERT_EQ(desc.inputConfig[5].inputSources.size(), 1); in TEST() 139 ASSERT_EQ(desc.inputConfig.size(), 3); in TEST() 140 ASSERT_EQ(desc.inputConfig[0].inputSources.size(), 1); in TEST() 143 ASSERT_EQ(desc.inputConfig[1].inputSources.size(), 1); in TEST() [all …]
|