/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/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/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 | 380 for (Camera.Size size : parameters.getSupportedPreviewSizes()) { in getBestPreviewSize() 381 double ratio = getRatio(size.width, size.height); in getBestPreviewSize() 382 if (size.height * size.width > bestChoice.getWidth() * bestChoice.getHeight() in getBestPreviewSize() 385 bestChoice = new Size(size.width, size.height); in getBestPreviewSize() 386 bestChoiceRatio = getRatio(size.width, size.height); in getBestPreviewSize() 401 for (Camera.Size size : parameters.getSupportedPictureSizes()) { in getBestPictureSize() 402 double ratio = getRatio(size.width, size.height); in getBestPictureSize() 404 bestChoices.add(new Size(size.width, size.height)); in getBestPictureSize() 406 similarChoices.add(new Size(size.width, size.height)); in getBestPictureSize() 410 if (bestChoices.size() == 0 && similarChoices.size() == 0) { in getBestPictureSize() [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/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/services/Car/service/src/com/android/car/ |
D | CarServiceUtils.java | 144 final int size = list.size(); in toFloatArray() local 145 final float[] array = new float[size]; in toFloatArray() 146 for (int i = 0; i < size; ++i) { in toFloatArray() 153 final int size = list.size(); in toIntArray() local 154 final int[] array = new int[size]; in toIntArray() 155 for (int i = 0; i < size; ++i) { in toIntArray() 162 final int size = list.size(); in toByteArray() local 163 final byte[] array = new byte[size]; in toByteArray() 164 for (int i = 0; i < size; ++i) { in toByteArray()
|
/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/Gallery2/src/com/android/gallery3d/data/ |
D | TimeClustering.java | 128 int n = items.size(); in run() 150 int m = mClusters.size(); in run() 159 return mClusters.size(); in getNumberOfClusters() 165 ArrayList<Path> result = new ArrayList<Path>(items.size()); in getCluster() 166 for (int i = 0, n = items.size(); i < n; i++) { in getCluster() 194 int numClusters = mClusters.size(); in compute() 195 int numCurrClusterItems = mCurrCluster.size(); in compute() 230 if (mCurrCluster.size() > 0) { in compute() 231 int numClusters = mClusters.size(); in compute() 232 int numCurrClusterItems = mCurrCluster.size(); in compute() [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/apps/DocumentsUI/src/com/android/documentsui/ |
D | ThumbnailCache.java | 70 public Result getThumbnail(Uri uri, Point size) { in getThumbnail() argument 79 Pair<Uri, Point> cacheKey = sizeMap.get(size); in getThumbnail() 83 return Result.obtain(Result.CACHE_HIT_EXACT, size, entry); in getThumbnail() 88 Point otherSize = sizeMap.higherKey(size); in getThumbnail() 101 otherSize = sizeMap.lowerKey(size); in getThumbnail() 124 public void putThumbnail(Uri uri, Point size, Bitmap thumbnail, long lastModified) { in putThumbnail() argument 125 Pair<Uri, Point> cacheKey = Pair.create(uri, size); in putThumbnail() 139 sizeMap.put(size, cacheKey); in putThumbnail() 163 private void removeKey(Uri uri, Point size) { in removeKey() argument 171 sizeMap.remove(size); in removeKey() [all …]
|
/packages/modules/IPsec/tests/iketests/src/java/android/net/ipsec/ike/ |
D | ChildSessionConfigurationTest.java | 110 assertEquals(expectedList.size(), tsList.size()); in verifyTsList() 111 for (int i = 0; i < expectedList.size(); i++) { in verifyTsList() 142 assertEquals(expectedInternalAddrList.size(), sessionConfig.getInternalAddresses().size()); in testBuildWithNetmaskAttr() 143 for (int i = 0; i < expectedInternalAddrList.size(); i++) { in testBuildWithNetmaskAttr() 166 assertEquals(expectedInternalAddrList.size(), sessionConfig.getInternalAddresses().size()); in testBuildWithoutNetmaskAttr() 167 for (int i = 0; i < expectedInternalAddrList.size(); i++) { in testBuildWithoutNetmaskAttr() 207 assertEquals(expectedDnsAddrList.size(), sessionConfig.getInternalDnsServers().size()); in testBuildWithDnsAttr() 208 for (int i = 0; i < expectedDnsAddrList.size(); i++) { in testBuildWithDnsAttr() 230 assertEquals(expectedSubnetAddrList.size(), sessionConfig.getInternalSubnets().size()); in testBuildWithSubnetAttr() 231 for (int i = 0; i < expectedSubnetAddrList.size(); i++) { in testBuildWithSubnetAttr() [all …]
|
/packages/apps/Settings/src/com/android/settings/fuelgauge/batterytip/tips/ |
D | RestrictAppTip.java | 62 final int num = mRestrictAppList.size(); in getTitle() 75 final int num = mRestrictAppList.size(); in getSummary() 125 for (int i = 0, size = mRestrictAppList.size(); i < size; i++) { in log() 147 for (int i = 0, size = mRestrictAppList.size(); i < size; i++) { in getRestrictAppsString() 159 for (int i = 0, size = mRestrictAppList.size(); i < size; i++) { in toString() 179 public BatteryTip[] newArray(int size) { 180 return new RestrictAppTip[size];
|