Home
last modified time | relevance | path

Searched refs:data (Results 1 – 25 of 383) sorted by relevance

12345678910>>...16

/cts/tests/tests/opengl/libopengltest/
Dgl2_jni_libone.cpp54 Data data = attachShaderOne(); in Java_android_opengl_cts_GL2JniLibOne_init() local
55 LOGI("Attach Shader Error : %d\n", data.mShaderError); in Java_android_opengl_cts_GL2JniLibOne_init()
56 LOGI("Shader Count : %d\n", data.mShaderCount); in Java_android_opengl_cts_GL2JniLibOne_init()
57 errorAttachShader = data.mShaderError; in Java_android_opengl_cts_GL2JniLibOne_init()
58 shaderCount = data.mShaderCount; in Java_android_opengl_cts_GL2JniLibOne_init()
60 Data data = attachShaderTwo(); in Java_android_opengl_cts_GL2JniLibOne_init() local
61 LOGI("Attach Shader Error : %d\n", data.mShaderError); in Java_android_opengl_cts_GL2JniLibOne_init()
62 errorAttachShader = data.mShaderError; in Java_android_opengl_cts_GL2JniLibOne_init()
64 Data data = attachShaderThree(); in Java_android_opengl_cts_GL2JniLibOne_init() local
65 LOGI("Attach Shader Error : %d\n", data.mShaderError); in Java_android_opengl_cts_GL2JniLibOne_init()
[all …]
/cts/common/util/src/com/android/compatibility/common/util/
DStat.java51 public static StatResult getStat(double[] data) { in getStat() argument
52 double average = data[0]; in getStat()
53 double min = data[0]; in getStat()
54 double max = data[0]; in getStat()
55 for (int i = 1; i < data.length; i++) { in getStat()
56 average += data[i]; in getStat()
57 if (data[i] > max) { in getStat()
58 max = data[i]; in getStat()
60 if (data[i] < min) { in getStat()
61 min = data[i]; in getStat()
[all …]
/cts/suite/audio_quality/lib/src/audio/
DAudioProtocol.cpp36 bool AudioProtocol::handleReply(const uint32_t* data, AudioParam* param) in handleReply() argument
38 if (!checkHeaderId(data, mCommand)) { in handleReply()
41 if (data[1] != 0) { // no endian change for 0 in handleReply()
42 LOGE("error in reply %d", ntohl(data[1])); in handleReply()
45 if (data[2] != 0) { in handleReply()
46 LOGE("payload length %d not zero", ntohl(data[2])); in handleReply()
52 bool AudioProtocol::handleReplyHeader(ClientSocket& socket, uint32_t* data, CommandId& id) in handleReplyHeader() argument
54 if (!socket.readData((char*)data, REPLY_HEADER_SIZE)) { in handleReplyHeader()
58 uint32_t command = ntohl(data[0]); in handleReplyHeader()
60 LOGE("Wrong header %x %x", command, data[0]); in handleReplyHeader()
[all …]
DAudioSignalFactory.cpp31 int16_t* data = reinterpret_cast<int16_t*>(buffer->getData()); in generateSineWave() local
35 *data = (int16_t)val; in generateSineWave()
36 data++; in generateSineWave()
38 *data = (int16_t)val; in generateSineWave()
39 data++; in generateSineWave()
53 int16_t* data = reinterpret_cast<int16_t*>(buffer->getData()); in generateWhiteNoise() local
59 *data = val; in generateWhiteNoise()
60 data++; in generateWhiteNoise()
62 *data = val; in generateWhiteNoise()
63 data++; in generateWhiteNoise()
[all …]
/cts/apps/CtsVerifier/src/com/android/cts/verifier/audio/
DUtil.java24 public static double mean(double[] data) { in mean() argument
26 return mean.evaluate(data); in mean()
32 public static double std(double[] data) { in std() argument
34 return std.evaluate(data); in std()
40 public static double median(double[] data) { in median() argument
42 median.setData(data); in median()
50 public static Complex[] padZeros(Complex[] data, int length) { in padZeros() argument
52 if (length < data.length) { in padZeros()
53 System.arraycopy(data, 0, result, 0, length); in padZeros()
55 System.arraycopy(data, 0, result, 0, data.length); in padZeros()
[all …]
DCorrelation.java40 public boolean computeCorrelation(double [] data, int samplingRate) { in computeCorrelation() argument
42 log("Started Auto Correlation for data with " + data.length + " points"); in computeCorrelation()
45 downsampleData(data, mDataDownsampled, mAmplitudeThreshold); in computeCorrelation()
50 int N = data.length; //all samples available in computeCorrelation()
74 mDataAutocorrelated.length, data.length, minIndex)); in computeCorrelation()
100 private boolean downsampleData(double [] data, double [] dataDownsampled, double threshold) { in downsampleData() argument
108 int N = data.length; //all samples available in downsampleData()
126 double value = Math.abs(data[i]); in downsampleData()
141 private boolean autocorrelation(double [] data, double [] dataOut) { in autocorrelation() argument
145 int N = data.length; in autocorrelation()
[all …]
/cts/tests/tests/bluetooth/src/android/bluetooth/cts/
DScanRecordTest.java43 ScanRecord data = TestUtils.parseScanRecord(scanRecord); in testParser() local
44 assertEquals(0x1a, data.getAdvertiseFlags()); in testParser()
47 assertTrue(data.getServiceUuids().contains(uuid1)); in testParser()
48 assertTrue(data.getServiceUuids().contains(uuid2)); in testParser()
50 assertEquals("Ped", data.getDeviceName()); in testParser()
51 assertEquals(-20, data.getTxPowerLevel()); in testParser()
53 assertTrue(data.getManufacturerSpecificData().get(0x00E0) != null); in testParser()
58 data.getManufacturerSpecificData().get(0x00E0)); in testParser()
59 TestUtils.assertArrayEquals(manufacturerData, data.getManufacturerSpecificData(0x00E0)); in testParser()
61 assertTrue(data.getServiceData().containsKey(uuid2)); in testParser()
[all …]
DAdvertiseDataTest.java43 AdvertiseData data = mAdvertiseDataBuilder.build(); in testEmptyData() local
44 data.writeToParcel(parcel, 0); in testEmptyData()
48 assertEquals(data, dataFromParcel); in testEmptyData()
59 AdvertiseData data = mAdvertiseDataBuilder.setIncludeDeviceName(true).build(); in testEmptyServiceUuid() local
60 data.writeToParcel(parcel, 0); in testEmptyServiceUuid()
64 assertEquals(data, dataFromParcel); in testEmptyServiceUuid()
74 AdvertiseData data = in testEmptyManufacturerData() local
77 data.writeToParcel(parcel, 0); in testEmptyManufacturerData()
81 assertEquals(data, dataFromParcel); in testEmptyManufacturerData()
90 AdvertiseData data = in testEmptyServiceData() local
[all …]
/cts/apps/CtsVerifier/src/com/android/cts/verifier/audio/wavelib/
DVectorAverage.java33 public void setData(double[] data, boolean replace) { in setData() argument
34 int size = data.length; in setData()
40 System.arraycopy(data, 0, mData, 0, size); in setData()
47 mData[i] += data[i]; in setData()
54 if (data[i] > mData[i]) { in setData()
55 mData[i] = data[i]; in setData()
63 if (data[i] < mData[i]) { in setData()
64 mData[i] = data[i]; in setData()
74 public int getData(double[] data, boolean raw) { in getData() argument
76 if (mData != null && mData.length <= data.length) { in getData()
[all …]
/cts/tests/tests/content/src/android/content/res/cts/
DAssetManager_AssetInputStreamTest.java81 byte[] data = new byte[dataLength]; in testReadMethods()
82 int ret = mAssetInputStream.read(data); in testReadMethods()
85 assertEquals(bytes[i], data[i]); in testReadMethods()
87 data = new byte[len - dataLength]; in testReadMethods()
88 assertEquals(len - dataLength, mAssetInputStream.read(data)); in testReadMethods()
90 assertEquals(bytes[i + dataLength], data[i]); in testReadMethods()
92 assertEquals(end, mAssetInputStream.read(data)); in testReadMethods()
97 ret = mAssetInputStream.read(data, offset, dataLength); in testReadMethods()
100 assertEquals(bytes[i], data[offset + i]); in testReadMethods()
104 ret = mAssetInputStream.read(data, offset, dataLength); in testReadMethods()
[all …]
/cts/tests/tests/os/src/android/os/cts/
DMemoryFileTest.java40 byte[] data = new byte[512]; in testWriteBytes()
43 mMemoryFile.writeBytes(data, 0, 0, 512); in testWriteBytes()
56 byte[] data = new byte[512]; in checkWriteBytesInIllegalParameter()
57 mMemoryFile.writeBytes(data, srcOffset, destOffset, count); in checkWriteBytesInIllegalParameter()
84 byte[] data = new byte[512]; in testAllowPurging()
86 mMemoryFile.writeBytes(data, 0, 0, 512); in testAllowPurging()
93 mMemoryFile.writeBytes(data, 0, 0, 512); in testAllowPurging()
118 byte[] data = new byte[] { 1, 2, 3, 4 }; in testReadBytes()
119 mMemoryFile.writeBytes(data, 0, 0, data.length); in testReadBytes()
142 byte[] data = new byte[512]; in checkReadBytesInIllegalParameter()
[all …]
DLocalService.java49 protected boolean onTransact(int code, Parcel data, Parcel reply,
52 data.enforceInterface(SERVICE_LOCAL);
53 mReportObject = data.readStrongBinder();
56 return super.onTransact(code, data, reply, flags);
106 Parcel data = Parcel.obtain(); in bindAction() local
107 data.writeInterfaceToken(SERVICE_LOCAL); in bindAction()
109 data.writeInt(mStartCount); in bindAction()
113 bindCode, data, null, 0); in bindAction()
114 data.recycle(); in bindAction()
/cts/suite/audio_quality/test/
DBufferTest.cpp43 int16_t* data = (int16_t*)buffer->getData(); in TEST_F() local
44 ASSERT_TRUE(data != NULL); in TEST_F()
46 data[2*i] = i; in TEST_F()
47 data[2*i+1] = i; in TEST_F()
58 ASSERT_TRUE(data[2*i] == dataRead[2*i]); in TEST_F()
59 ASSERT_TRUE(data[2*i+1] == dataRead[2*i+1]); in TEST_F()
68 int16_t* data = (int16_t*)buffer->getData(); in TEST_F() local
69 ASSERT_TRUE(data != NULL); in TEST_F()
71 data[i] = i; in TEST_F()
75 data = (int16_t*)bufferl->getData(); in TEST_F()
[all …]
DAudioSignalFactoryTest.cpp28 int16_t* data = reinterpret_cast<int16_t*>(buffer->getData()); in testSignalBasic() local
30 ASSERT_TRUE(*data <= maxPositive); in testSignalBasic()
31 ASSERT_TRUE(*data >= -maxPositive); in testSignalBasic()
32 data++; in testSignalBasic()
33 ASSERT_TRUE(*data <= maxPositive); in testSignalBasic()
34 ASSERT_TRUE(*data >= -maxPositive); in testSignalBasic()
35 data++; in testSignalBasic()
/cts/tests/tests/renderscript/src/android/renderscript/cts/
Dsend_to_client.rs6 int data[4];
7 data[0] = in->y;
8 data[1] = in->z;
9 data[2] = in->w;
10 rsSendToClient(id, data, sizeof(data));
/cts/tests/tests/media/src/android/media/cts/
DAudioTrackTest.java451 byte data[] = new byte[minBuffSize]; in testPlaybackHeadPositionIncrease()
454 track.write(data, OFFSET_DEFAULT, data.length); in testPlaybackHeadPositionIncrease()
455 track.write(data, OFFSET_DEFAULT, data.length); in testPlaybackHeadPositionIncrease()
478 byte data[] = new byte[minBuffSize]; in testPlaybackHeadPositionAfterFlush()
481 track.write(data, OFFSET_DEFAULT, data.length); in testPlaybackHeadPositionAfterFlush()
482 track.write(data, OFFSET_DEFAULT, data.length); in testPlaybackHeadPositionAfterFlush()
508 byte data[] = new byte[minBuffSize]; in testPlaybackHeadPositionAfterStop()
511 track.write(data, OFFSET_DEFAULT, data.length); in testPlaybackHeadPositionAfterStop()
512 track.write(data, OFFSET_DEFAULT, data.length); in testPlaybackHeadPositionAfterStop()
543 byte data[] = new byte[minBuffSize]; in testPlaybackHeadPositionAfterPause()
[all …]
DAudioTrackLatencyTest.java305 final short[] data = AudioHelper.createSineWavesShort(TEST_FRAMES_PER_BUFFER, in checkOutputLowLatency() local
319 track.write(data, 0, data.length); in checkOutputLowLatency()
388 final short[] data = AudioHelper.createSineWavesShort(TEST_FRAMES_PER_BUFFER, in testGetUnderrunCount() local
413 while (track.write(data, 0, data.length) == data.length); in testGetUnderrunCount()
419 track.write(data, 0, data.length); in testGetUnderrunCount()
426 track.write(data, 0, data.length); in testGetUnderrunCount()
438 track.write(data, 0, data.length); in testGetUnderrunCount()
453 track.write(data, 0, data.length); in testGetUnderrunCount()
460 track.write(data, 0, data.length); in testGetUnderrunCount()
471 track.write(data, 0, data.length); in testGetUnderrunCount()
[all …]
/cts/tests/tests/database/src/android/database/cts/
DCharArrayBufferTest.java27 assertEquals(0, charArrayBuffer.data.length); in testCharArrayBuffer()
28 charArrayBuffer.data = new char[100]; in testCharArrayBuffer()
29 assertEquals(100, charArrayBuffer.data.length); in testCharArrayBuffer()
31 assertEquals(100, (new CharArrayBuffer(100)).data.length); in testCharArrayBuffer()
33 assertNull((new CharArrayBuffer(null)).data); in testCharArrayBuffer()
36 assertSame(expectedData, (new CharArrayBuffer(expectedData)).data); in testCharArrayBuffer()
/cts/common/device-side/util/src/com/android/compatibility/common/util/
DWithin.java43 public void verify(VerificationData data) { in verify() argument
52 final List<Invocation> actualInvocations = data.getAllInvocations(); in verify()
55 if (data.getWanted().matches(invocation)) { in verify()
57 markAllInvocationsAsVerified(data); in verify()
74 "Timed out while waiting " + mTimeout + "ms for " + data.getWanted().toString()); in verify()
85 private void markAllInvocationsAsVerified(VerificationData data) { in markAllInvocationsAsVerified() argument
86 for (Invocation invocation : data.getAllInvocations()) { in markAllInvocationsAsVerified()
88 data.getWanted().captureArgumentsFrom(invocation); in markAllInvocationsAsVerified()
/cts/tests/tests/renderscript/src/android/renderscript/cts/refocus/
DXmpDepthDecode.java85 byte[] data = meta.getPropertyBase64(XMP_DEPTHMAP, "GDepth:Data"); in XmpDepthDecode()
86 mDepthBitmap = BitmapFactory.decodeStream(new ByteArrayInputStream(data)); in XmpDepthDecode()
140 public byte[] data; field in XmpDepthDecode.Section
236 section.data = new byte[is.available()]; in parse()
237 is.read(section.data, 0, section.data.length); in parse()
278 private static boolean hasHeader(byte[] data, String header) { in hasHeader() argument
279 if (data.length < header.length()) { in hasHeader()
284 System.arraycopy(data, 0, buffer, 0, header.length()); in hasHeader()
300 section.data = new byte[length - 2]; in readSection()
301 is.read(section.data, 0, length - 2); in readSection()
[all …]
/cts/hostsidetests/security/securityPatch/CVE-2016-8444/
Dpoc.c41 struct ispif_cfg_data data; variable
48 data.cfg_type = 8; ////release in worker_thread()
49 ioctl(fd, VIDIOC_MSM_ISPIF_CFG, &data); in worker_thread()
68 data.cfg_type = 2; ////init in main()
69 data.csid_version = 1; in main()
70 ioctl(fd, VIDIOC_MSM_ISPIF_CFG, &data); in main()
/cts/tests/tests/content/jni/
DNativeCursorWindow.c66 } data; member
77 void *data = mmap(NULL, 1024, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); in Java_android_content_cts_CursorWindowContentProvider_makeNativeCursorWindowFd() local
79 struct Header *header = (struct Header *) data; in Java_android_content_cts_CursorWindowContentProvider_makeNativeCursorWindowFd()
81 struct RowSlotChunk *rowSlotChunk = (struct RowSlotChunk *)(data + rowSlotChunkOffset); in Java_android_content_cts_CursorWindowContentProvider_makeNativeCursorWindowFd()
83 struct FieldSlot *fieldSlot = (struct FieldSlot *) (data + fieldSlotOffset); in Java_android_content_cts_CursorWindowContentProvider_makeNativeCursorWindowFd()
92 fieldSlot->data.buffer.offset = offset; in Java_android_content_cts_CursorWindowContentProvider_makeNativeCursorWindowFd()
93 fieldSlot->data.buffer.size = size; in Java_android_content_cts_CursorWindowContentProvider_makeNativeCursorWindowFd()
95 munmap(data, 1024); in Java_android_content_cts_CursorWindowContentProvider_makeNativeCursorWindowFd()
/cts/tests/app/app/src/android/app/stubs/
DLocalService.java49 protected boolean onTransact(int code, Parcel data, Parcel reply,
52 data.enforceInterface(SERVICE_LOCAL);
53 mReportObject = data.readStrongBinder();
56 return super.onTransact(code, data, reply, flags);
106 Parcel data = Parcel.obtain(); in bindAction() local
107 data.writeInterfaceToken(SERVICE_LOCAL); in bindAction()
109 data.writeInt(mStartCount); in bindAction()
113 bindCode, data, null, 0); in bindAction()
114 data.recycle(); in bindAction()
/cts/hostsidetests/devicepolicy/app/VpnApp/src/com/android/cts/vpnfirewall/
DIcmpMessage.java29 byte[] data; field in IcmpMessage
38 data = new byte[dataLength]; in IcmpMessage()
39 int len = stream.read(data, 0, dataLength); in IcmpMessage()
61 stream.write(data, 0, data.length); in getEncoded()
78 for (int i = 0 ; i < data.length; i++) { in toString()
82 if (Character.isLetter((char) data[i])) { in toString()
83 out.append(String.format(" %2c", (char) data[i])); in toString()
85 out.append(String.format(" %02X", data[i] & 0xFF)); in toString()
/cts/apps/CameraITS/tests/scene3/
Dtest_lens_position.py87 data = {'fd': fds_fb[i]}
88 data['loc'] = cap['metadata']['android.lens.focusDistance']
89 print ' focus distance (diopters): %.3f' % data['fd']
90 print ' current lens location (diopters): %.3f' % data['loc']
96 data['sharpness'] = white_level*its.image.compute_image_sharpness(chart)
97 print 'Chart sharpness: %.1f\n' % data['sharpness']
98 data_static[i] = data
106 data = {'fd': fds_f[i]}
107 data['loc'] = cap['metadata']['android.lens.focusDistance']
108 data['lens_moving'] = (cap['metadata']['android.lens.state']
[all …]

12345678910>>...16