/cts/tests/tests/util/src/android/util/cts/ |
D | LongSparseArrayTest.java | 47 assertEquals(0, sparseArray.size()); in testSparseArrayWithDefaultCapacity() 53 assertEquals(i + 1, sparseArray.size()); in testSparseArrayWithDefaultCapacity() 69 assertEquals(LENGTH, sparseArray.size()); in testSparseArrayWithDefaultCapacity() 72 assertEquals(LENGTH, sparseArray.size()); in testSparseArrayWithDefaultCapacity() 78 int size = sparseArray.size(); in testSparseArrayWithDefaultCapacity() local 80 assertEquals(size + 1, sparseArray.size()); in testSparseArrayWithDefaultCapacity() 81 assertEquals(size, sparseArray.indexOfKey(NON_EXISTED_KEY)); in testSparseArrayWithDefaultCapacity() 82 assertEquals(size, sparseArray.indexOfValue(VALUE_FOR_NON_EXISTED_KEY)); in testSparseArrayWithDefaultCapacity() 83 assertEquals(NON_EXISTED_KEY, sparseArray.keyAt(size)); in testSparseArrayWithDefaultCapacity() 84 assertEquals(VALUE_FOR_NON_EXISTED_KEY, sparseArray.valueAt(size)); in testSparseArrayWithDefaultCapacity() [all …]
|
D | SparseLongArrayTest.java | 45 assertEquals(0, sparseArray.size()); in testSparseArrayWithDefaultCapacity() 51 assertEquals(i + 1, sparseArray.size()); in testSparseArrayWithDefaultCapacity() 67 assertEquals(LENGTH, sparseArray.size()); in testSparseArrayWithDefaultCapacity() 70 assertEquals(LENGTH, sparseArray.size()); in testSparseArrayWithDefaultCapacity() 76 int size = sparseArray.size(); in testSparseArrayWithDefaultCapacity() local 78 assertEquals(size + 1, sparseArray.size()); in testSparseArrayWithDefaultCapacity() 79 assertEquals(size, sparseArray.indexOfKey(NON_EXISTED_KEY)); in testSparseArrayWithDefaultCapacity() 80 assertEquals(size, sparseArray.indexOfValue(VALUE_FOR_NON_EXISTED_KEY)); in testSparseArrayWithDefaultCapacity() 81 assertEquals(NON_EXISTED_KEY, sparseArray.keyAt(size)); in testSparseArrayWithDefaultCapacity() 82 assertEquals(VALUE_FOR_NON_EXISTED_KEY, sparseArray.valueAt(size)); in testSparseArrayWithDefaultCapacity() [all …]
|
D | SparseIntArrayTest.java | 41 assertEquals(0, sparseIntArray.size()); in testSparseIntArrayWithDefaultCapacity() 46 assertEquals(i + 1, sparseIntArray.size()); in testSparseIntArrayWithDefaultCapacity() 61 assertEquals(13, sparseIntArray.size()); in testSparseIntArrayWithDefaultCapacity() 64 assertEquals(13, sparseIntArray.size()); in testSparseIntArrayWithDefaultCapacity() 70 int size = sparseIntArray.size(); in testSparseIntArrayWithDefaultCapacity() local 72 assertEquals(size + 1, sparseIntArray.size()); in testSparseIntArrayWithDefaultCapacity() 73 assertEquals(size, sparseIntArray.indexOfKey(NON_EXISTED_KEY)); in testSparseIntArrayWithDefaultCapacity() 74 assertEquals(size, sparseIntArray.indexOfValue(VALUE_FOR_NON_EXISTED_KEY)); in testSparseIntArrayWithDefaultCapacity() 75 assertEquals(NON_EXISTED_KEY, sparseIntArray.keyAt(size)); in testSparseIntArrayWithDefaultCapacity() 76 assertEquals(VALUE_FOR_NON_EXISTED_KEY, sparseIntArray.valueAt(size)); in testSparseIntArrayWithDefaultCapacity() [all …]
|
D | SparseArrayTest.java | 51 assertEquals(0, sparseArray.size()); in testSparseArrayWithDefaultCapacity() 57 assertEquals(i + 1, sparseArray.size()); in testSparseArrayWithDefaultCapacity() 73 assertEquals(LENGTH, sparseArray.size()); in testSparseArrayWithDefaultCapacity() 76 assertEquals(LENGTH, sparseArray.size()); in testSparseArrayWithDefaultCapacity() 82 int size = sparseArray.size(); in testSparseArrayWithDefaultCapacity() local 84 assertEquals(size + 1, sparseArray.size()); in testSparseArrayWithDefaultCapacity() 85 assertEquals(size, sparseArray.indexOfKey(NON_EXISTED_KEY)); in testSparseArrayWithDefaultCapacity() 86 assertEquals(size, sparseArray.indexOfValue(VALUE_FOR_NON_EXISTED_KEY)); in testSparseArrayWithDefaultCapacity() 87 assertEquals(NON_EXISTED_KEY, sparseArray.keyAt(size)); in testSparseArrayWithDefaultCapacity() 88 assertEquals(VALUE_FOR_NON_EXISTED_KEY, sparseArray.valueAt(size)); in testSparseArrayWithDefaultCapacity() [all …]
|
D | SparseBooleanArrayTest.java | 42 assertEquals(0, sparseBooleanArray.size()); in testSparseBooleanArrayWithDefaultCapacity() 47 assertEquals(i + 1, sparseBooleanArray.size()); in testSparseBooleanArrayWithDefaultCapacity() 68 assertEquals(13, sparseBooleanArray.size()); in testSparseBooleanArrayWithDefaultCapacity() 71 assertEquals(13, sparseBooleanArray.size()); in testSparseBooleanArrayWithDefaultCapacity() 77 int size = sparseBooleanArray.size(); in testSparseBooleanArrayWithDefaultCapacity() local 79 assertEquals(size + 1, sparseBooleanArray.size()); in testSparseBooleanArrayWithDefaultCapacity() 80 assertEquals(size, sparseBooleanArray.indexOfKey(NON_EXISTED_KEY)); in testSparseBooleanArrayWithDefaultCapacity() 83 assertEquals(NON_EXISTED_KEY, sparseBooleanArray.keyAt(size)); in testSparseBooleanArrayWithDefaultCapacity() 84 assertEquals(VALUE_FOR_NON_EXISTED_KEY, sparseBooleanArray.valueAt(size)); in testSparseBooleanArrayWithDefaultCapacity() 93 assertEquals(0, sparseBooleanArray.size()); in testSparseBooleanArrayWithDefaultCapacity() [all …]
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/audio/wavelib/ |
D | DspWindow.java | 35 public DspWindow(int windowType, int size, int overlap) { in DspWindow() argument 36 init(windowType, size, overlap); in DspWindow() 39 public DspWindow(int windowType, int size) { in DspWindow() argument 40 init(windowType, size, size / 2); in DspWindow() 43 public void init(int windowType, int size, int overlap) { in init() argument 44 if (size > 0 && overlap > 0) { in init() 45 mSize = size; in init() 64 int size = r.getSize(); in fillWindow() local 65 if (overlap > size / 2) { in fillWindow() 66 overlap = size / 2; in fillWindow() [all …]
|
D | DspBufferDouble.java | 22 public DspBufferDouble(int size) { in DspBufferDouble() argument 23 super(size); in DspBufferDouble() 27 public void setSize(int size) { in setSize() argument 28 if (size == getSize()) { in setSize() 31 mData = new double[size]; in setSize() 32 super.setSize(size); in setSize() 49 int size = getSize(); in toString() local 50 sb.append(String.format("Size: %d { ", size)); in toString() 52 for (; i < size - 1; i++) { in toString() 55 for(; i < size; i++) { in toString()
|
D | DspBufferComplex.java | 23 public DspBufferComplex(int size) { in DspBufferComplex() argument 24 super(size); in DspBufferComplex() 28 public void setSize(int size) { in setSize() argument 29 if (size == getSize()) { in setSize() 32 mReal = new double[size]; in setSize() 33 mImag = new double[size]; in setSize() 34 super.setSize(size); in setSize() 53 int size = getSize(); in toString() local 54 sb.append(String.format("Size: %d { ", size)); in toString() 55 for (int i = 0; i < size; i++) { in toString()
|
D | DspBufferMath.java | 55 int size = Math.min(a.getSize(), b.getSize()); in add() local 56 r.setSize(size); in add() 76 for (int i = 0; i < size; i++) { in add() 83 for (int i = 0; i < size; i++) { in add() 91 for (int i = 0; i < size; i++) { in add() 101 for (int i = 0; i < size; i++) { in add() 107 for (int i = 0; i < size; i++) { in add() 113 for (int i = 0; i < size; i++) { in add() 127 int size = Math.min(a.getSize(), b.getSize()); in mult() local 128 r.setSize(size); in mult() [all …]
|
/cts/tests/tests/media/audio/jni/ |
D | Blob.h | 30 BlobReadOnly(const void *data, size_t size, bool byReference) : in BlobReadOnly() argument 31 mMem(byReference ? NULL : malloc(size)), in BlobReadOnly() 33 mSize(size) { in BlobReadOnly() 35 memcpy(mMem, data, size); in BlobReadOnly() 54 Blob(size_t size) : in Blob() argument 55 mData(malloc(size)), in Blob() 57 mSize(size), in Blob() 61 Blob(void *data, size_t size) : in Blob() argument 64 mSize(size), in Blob()
|
D | WaveTableGenerator.cpp | 29 float* WaveTableGenerator::genSinWave(int size, float maxValue) { in genSinWave() argument 30 return genSinWave(size, maxValue, new float[size]); in genSinWave() 33 float* WaveTableGenerator::genSinWave(int size, float maxValue, float* tbl) { in genSinWave() argument 34 float incr = (kPI * 2.0f) / (float) size; in genSinWave() 36 for (int index = 0; index < size; index++) { in genSinWave()
|
/cts/hostsidetests/securitybulletin/securityPatch/includes/ |
D | memutils.c | 90 void *memalign(size_t alignment, size_t size) { in memalign() argument 96 return real_memalign(alignment, size); in memalign() 102 size_t aligned_size = size; in memalign() 107 return real_memalign(alignment, size); in memalign() 111 return real_memalign(alignment, size); in memalign() 114 if ((0 == page_size) || (0 == alignment) || (0 == size)) { in memalign() 115 return real_memalign(alignment, size); in memalign() 122 if (0 != (size % MINIMUM_ALIGNMENT)) { in memalign() 123 aligned_size = size + (MINIMUM_ALIGNMENT - (size % MINIMUM_ALIGNMENT)); in memalign() 146 s_mem_map[s_mem_map_index].mem_size = size; in memalign() [all …]
|
D | memutils_track.c | 53 void *memalign(size_t alignment, size_t size) { in memalign() argument 57 void* mem_ptr = real_memalign(alignment, size); in memalign() 61 memset(mem_ptr, INITIAL_VAL, size); in memalign() 71 if (!is_tracking_required(size)) { in memalign() 78 s_allocation_list[s_allocation_index].mem_size = size; in memalign() 83 void *malloc(size_t size) { in malloc() argument 87 void* mem_ptr = real_malloc(size); in malloc() 91 memset(mem_ptr, INITIAL_VAL, size); in malloc() 101 if (!is_tracking_required(size)) { in malloc() 108 s_allocation_list[s_allocation_index].mem_size = size; in malloc() [all …]
|
/cts/tests/aslr/src/ |
D | AslrMallocTest.cpp | 63 auto size = readlink("/proc/self/exe", path, sizeof(path)); in SetUp() local 64 ASSERT_TRUE(size > 0 && size < PATH_MAX); in SetUp() 65 path[size] = '\0'; in SetUp() 110 for (auto size : allocSizes) { in TestRandomization() local 112 iterations, size); in TestRandomization() 119 GetAddress(size, address); in TestRandomization() 125 log2(static_cast<double>(addresses.size()))); in TestRandomization() 128 entropy, size, minEntropyBits); in TestRandomization() 130 "insufficient entropy for malloc(%zu)", size); in TestRandomization() 143 size_t size; in main() local [all …]
|
/cts/tests/tests/media/common/src/android/media/cts/ |
D | TestMediaDataSource.java | 46 final int size = (int) afd.getDeclaredLength(); in fromAssetFd() local 47 byte[] data = new byte[(int) size]; in fromAssetFd() 51 numRead = in.read(data, writeIndex, size - writeIndex); in fromAssetFd() 65 public synchronized int readAt(long position, byte[] buffer, int offset, int size) in readAt() argument 78 if (position + size > mData.length) { in readAt() 79 size -= (position + size) - mData.length; in readAt() 81 System.arraycopy(mData, (int)position, buffer, offset, size); in readAt() 82 return size; in readAt() 122 public void returnFromGetSize(long size) { in returnFromGetSize() argument 123 mReturnFromGetSize = size; in returnFromGetSize()
|
/cts/hostsidetests/securitybulletin/securityPatch/CVE-2019-9308/ |
D | poc.cpp | 31 void decodeFrames(UCHAR *data, UINT size); 53 void Codec::decodeFrames(UCHAR *data, UINT size) { in decodeFrames() argument 54 while (size > 0) { in decodeFrames() 55 UINT inputSize = size; in decodeFrames() 56 UINT valid = size; in decodeFrames() 62 size -= kConfigBytes; in decodeFrames() 74 size = valid; in decodeFrames() 89 UINT size = ftell(fp); in main() local 91 UCHAR *data = new UCHAR[size]; in main() 92 fread(data, sizeof(UCHAR), size, fp); in main() [all …]
|
/cts/tests/tests/media/misc/src/android/media/misc/cts/ |
D | TestProxyFileDescriptorCallback.java | 49 final int size = (int) afd.getDeclaredLength(); in fromAssetFd() local 50 byte[] data = new byte[(int) size]; in fromAssetFd() 54 numRead = in.read(data, writeIndex, size - writeIndex); in fromAssetFd() 68 public int onRead(long offset, int size, byte[] data) throws ErrnoException { in onRead() argument 80 if (offset + size > mData.length) { in onRead() 81 size -= (offset + size) - mData.length; in onRead() 83 System.arraycopy(mData, (int)offset, data, 0, size); in onRead() 84 return size; in onRead() 123 public void returnFromGetSize(long size) { in returnFromGetSize() argument 124 mReturnFromGetSize = size; in returnFromGetSize()
|
/cts/tests/tests/renderscript/src/android/renderscript/cts/ |
D | RSBaseCompute.java | 76 protected Element getElement(RenderScript rs, Element.DataType dataType, int size) { in getElement() argument 78 if (size == 1) { in getElement() 106 element = Element.createVector(rs, dataType, size); in getElement() 112 int size, long seed, boolean includeExtremes) { in createRandomAllocation() argument 113 Element element = getElement(rs, dataType, size); in createRandomAllocation() 115 int width = (size == 3) ? 4 : size; in createRandomAllocation() 176 int size, long seed, double minValue, double maxValue) { in createRandomFloatAllocation() argument 177 Element element = getElement(rs, dataType, size); in createRandomFloatAllocation() 179 int width = (size == 3) ? 4 : size; in createRandomFloatAllocation() 201 int size, long seed, boolean signed, int numberOfBits) { in createRandomIntegerAllocation() argument [all …]
|
/cts/tests/sensor/jni/ |
D | SensorTest.cpp | 73 int TestSensorManager::createSharedMemoryDirectChannel(int fd, size_t size) { in createSharedMemoryDirectChannel() argument 74 int ret = ASensorManager_createSharedMemoryDirectChannel(mManager, fd, size); in createSharedMemoryDirectChannel() 82 AHardwareBuffer const *buffer, size_t size) { in createHardwareBufferDirectChannel() argument 83 int ret = ASensorManager_createHardwareBufferDirectChannel(mManager, buffer, size); in createHardwareBufferDirectChannel() 122 int32_t size = *reinterpret_cast<int32_t *>(mBuffer + offset + kOffsetSize); in parseEvents() local 123 if (size != kEventSize) { in parseEvents() 137 TestSharedMemory::TestSharedMemory(int type, size_t size) in TestSharedMemory() argument 143 mSharedMemoryFd = ASharedMemory_create("TestSharedMemory", size); in TestSharedMemory() 145 || ASharedMemory_getSize(mSharedMemoryFd) != size) { in TestSharedMemory() 149 mSize = size; in TestSharedMemory() [all …]
|
/cts/apps/CameraITS/utils/ |
D | capture_request_utils.py | 41 def is_common_aspect_ratio(size): argument 51 if math.isclose(size[0]/size[1], aspect_ratio, 270 size = get_available_output_sizes(fmt, props)[-1] 271 out_spec = {'format': fmt, 'width': size[0], 'height': size[1]} 293 size = get_available_output_sizes(fmt, props)[-1] 294 out_spec = {'format': fmt, 'width': size[0], 'height': size[1]} 401 size = get_available_output_sizes('yuv', props, match_ar_size=match_ar)[0] 402 fmt = {'format': 'yuv', 'width': size[0], 'height': size[1]} 418 size = get_available_output_sizes('yuv', props, match_ar_size=match_ar)[-1] 419 fmt = {'format': 'yuv', 'width': size[0], 'height': size[1]} [all …]
|
/cts/hostsidetests/securitybulletin/securityPatch/CVE-2020-0034/ |
D | poc.cpp | 68 size_t size = ftell(fp); in main() local 70 FAIL_CHECK(size > IVF_FILE_HDR_SZ); in main() 72 std::vector<uint8_t> buffer(size); in main() 73 FAIL_CHECK(fread((void *)buffer.data(), sizeof(uint8_t), size, fp) == size); in main() 83 size -= IVF_FILE_HDR_SZ; in main() 85 while (size > IVF_FRAME_HDR_SZ) { in main() 87 size -= IVF_FRAME_HDR_SZ; in main() 89 frame_size = std::min(size, frame_size); in main() 103 size -= frame_size; in main()
|
/cts/hostsidetests/securitybulletin/securityPatch/CVE-2019-1988/ |
D | poc.cpp | 36 auto size = codec->getSampledDimensions(sampleSize); in decode() local 37 auto info = SkImageInfo::MakeN32Premul(size); in decode() 59 size_t size = inFile.tellg(); in main() local 60 if (size < 1) { in main() 65 uint8_t *data = (uint8_t *)malloc(size); in main() 69 inFile.read(reinterpret_cast<char *>(data), size); in main() 70 auto bytes = SkData::MakeWithoutCopy(data, size); in main() 71 bytes = SkData::MakeSubset(bytes.get(), 1, size - 1); in main()
|
/cts/hostsidetests/car/src/android/car/cts/powerpolicy/ |
D | PowerPolicyTestAnalyzer.java | 38 int size = result1.size(); in checkIfTestResultMatch() local 39 if (size != result2.size()) { in checkIfTestResultMatch() 42 for (int i = 0; i < size; i++) { in checkIfTestResultMatch() 109 if (longResult.size() < shortResult.size()) { in getDiff() 113 int shortSize = shortResult.size(); in getDiff() 114 int longSize = longResult.size(); in getDiff() 139 if (longResult.size() < shortResult.size()) { in getTailDiff() 143 int shortSize = shortResult.size(); in getTailDiff() 144 int longSize = longResult.size(); in getTailDiff()
|
/cts/tests/translation/src/android/translation/cts/unittests/ |
D | TranslationResponseTest.java | 61 assertThat(response.getTranslationResponseValues().size()).isEqualTo(0); in testBuilder_validViewTranslationResponse() 62 assertThat(response.getViewTranslationResponses().size()).isEqualTo(1); in testBuilder_validViewTranslationResponse() 67 assertThat(viewResponse.getKeys().size()).isEqualTo(1); in testBuilder_validViewTranslationResponse() 83 assertThat(response.getTranslationResponseValues().size()).isEqualTo(0); in testBuilder_errorViewTranslationResponse() 84 assertThat(response.getViewTranslationResponses().size()).isEqualTo(1); in testBuilder_errorViewTranslationResponse() 89 assertThat(viewResponse.getKeys().size()).isEqualTo(1); in testBuilder_errorViewTranslationResponse() 103 assertThat(response.getTranslationResponseValues().size()).isEqualTo(1); in testBuilder_validTranslationResponseValue() 104 assertThat(response.getViewTranslationResponses().size()).isEqualTo(0); in testBuilder_validTranslationResponseValue() 129 assertThat(parceledResponse.getTranslationResponseValues().size()).isEqualTo(2); in testParceledResponse_validTranslationResponseValues() 130 assertThat(parceledResponse.getViewTranslationResponses().size()).isEqualTo(0); in testParceledResponse_validTranslationResponseValues() [all …]
|
D | TranslationRequestTest.java | 52 assertThat(request.getTranslationRequestValues().size()).isEqualTo(0); in testBuilder_validViewTranslationRequest() 53 assertThat(request.getViewTranslationRequests().size()).isEqualTo(1); in testBuilder_validViewTranslationRequest() 58 assertThat(viewRequest.getKeys().size()).isEqualTo(1); in testBuilder_validViewTranslationRequest() 71 assertThat(request.getTranslationRequestValues().size()).isEqualTo(1); in testBuilder_validTranslationRequestValue() 72 assertThat(request.getViewTranslationRequests().size()).isEqualTo(0); in testBuilder_validTranslationRequestValue() 86 assertThat(request.getTranslationRequestValues().size()).isEqualTo(0); in testBuilder_validFlags() 87 assertThat(request.getViewTranslationRequests().size()).isEqualTo(0); in testBuilder_validFlags() 102 assertThat(request.getTranslationRequestValues().size()).isEqualTo(1); in testBuilder_mixingSetters() 103 assertThat(request.getViewTranslationRequests().size()).isEqualTo(1); in testBuilder_mixingSetters() 108 assertThat(viewRequest.getKeys().size()).isEqualTo(1); in testBuilder_mixingSetters() [all …]
|