/cts/hostsidetests/net/app/src/com/android/cts/net/hostside/ |
D | PacketReflector.java | 64 private static void swapBytes(byte[] buf, int pos1, int pos2, int len) { in swapBytes() argument 66 byte b = buf[pos1 + i]; in swapBytes() 67 buf[pos1 + i] = buf[pos2 + i]; in swapBytes() 68 buf[pos2 + i] = b; in swapBytes() 72 private static void swapAddresses(byte[] buf, int version) { in swapAddresses() argument 86 swapBytes(buf, addrPos, addrPos + addrLen, addrLen); in swapAddresses() 91 private void processTcpPacket(byte[] buf, int version, int len, int hdrLen) { in processTcpPacket() argument 97 swapAddresses(buf, version); in processTcpPacket() 100 writePacket(buf, len); in processTcpPacket() 105 private void processUdpPacket(byte[] buf, int version, int len, int hdrLen) { in processUdpPacket() argument [all …]
|
/cts/tests/tests/net/jni/ |
D | NativeDnsJni.c | 45 char buf[256]; in Java_android_net_cts_DnsTest_testNativeDns() local 48 buf, sizeof(buf)); in Java_android_net_cts_DnsTest_testNativeDns() 50 ALOGD(" %s", buf); in Java_android_net_cts_DnsTest_testNativeDns() 53 buf, sizeof(buf)); in Java_android_net_cts_DnsTest_testNativeDns() 55 ALOGD(" %s", buf); in Java_android_net_cts_DnsTest_testNativeDns() 78 char buf[256]; in Java_android_net_cts_DnsTest_testNativeDns() local 81 buf, sizeof(buf)); in Java_android_net_cts_DnsTest_testNativeDns() 82 ALOGD(" %s", buf); in Java_android_net_cts_DnsTest_testNativeDns() 86 buf, sizeof(buf)); in Java_android_net_cts_DnsTest_testNativeDns() 87 ALOGD(" %s", buf); in Java_android_net_cts_DnsTest_testNativeDns() [all …]
|
D | NativeMultinetworkJni.c | 96 char buf[kSockaddrStrLen+1]; in sockaddr_ntop() local 103 snprintf(buf, sizeof(buf), in sockaddr_ntop() 107 sprintf(buf, "???"); in sockaddr_ntop() 110 strlcpy(dst, buf, size); in sockaddr_ntop()
|
/cts/tests/tests/content/src/android/content/res/cts/ |
D | AssetFileDescriptor_AutoCloseInputStreamTest.java | 90 byte[] buf = new byte[FILE_LENGTH]; in testReadBufferLen() 91 assertEquals(3, mInput.read(buf, 0, 3)); in testReadBufferLen() 92 assertEquals(3, mInput.read(buf, 3, 3)); in testReadBufferLen() 93 assertEquals(3, mInput.read(buf, 6, 4)); in testReadBufferLen() 94 MoreAsserts.assertEquals(FILE_DATA, buf); in testReadBufferLen() 95 assertEquals(FILE_END, mInput.read(buf, 0, 4)); in testReadBufferLen() 100 byte[] buf = new byte[6]; in testReadBuffer() 101 assertEquals(6, mInput.read(buf)); in testReadBuffer() 102 assertEquals(FILE_DATA[0], buf[0]); in testReadBuffer() 103 assertEquals(3, mInput.read(buf)); in testReadBuffer() [all …]
|
/cts/tests/tests/voicesettings/common/src/android/voicesettings/common/ |
D | Utils.java | 38 StringBuilder buf = new StringBuilder(); in toBundleString() local 40 buf.append("extras: "); in toBundleString() 42 buf.append("(" + s + " = " + bundle.get(s) + "), "); in toBundleString() 45 return buf.toString(); in toBundleString()
|
/cts/tests/tests/alarmclock/common/src/android/alarmclock/common/ |
D | Utils.java | 42 StringBuilder buf = new StringBuilder(); in toBundleString() local 44 buf.append("extras: "); in toBundleString() 46 buf.append("(" + s + " = " + bundle.get(s) + "), "); in toBundleString() 49 return buf.toString(); in toBundleString()
|
/cts/tests/tests/keystore/src/android/keystore/cts/ |
D | HexEncoding.java | 56 public static String encode(ByteBuffer buf) { in encode() argument 57 return encode(buf.array(), buf.arrayOffset() + buf.position(), buf.remaining()); in encode()
|
/cts/tests/tests/security/jni/ |
D | android_security_cts_EncryptionTest.cpp | 135 uint8_t *buf; in android_security_cts_EncryptionTest_aesIsFast() local 150 buf = new (std::nothrow) uint8_t[TEST_BUFSIZE + in android_security_cts_EncryptionTest_aesIsFast() 153 if (!buf) { in android_security_cts_EncryptionTest_aesIsFast() 159 memset(buf, 0xF0, TEST_BUFSIZE); in android_security_cts_EncryptionTest_aesIsFast() 165 EVP_DecryptUpdate(&ctx, buf, &len, buf, TEST_BUFSIZE); in android_security_cts_EncryptionTest_aesIsFast() 170 delete[] buf; in android_security_cts_EncryptionTest_aesIsFast()
|
/cts/tests/tests/net/src/android/net/cts/ |
D | MultinetworkSysctlTest.java | 62 byte[] buf = new byte[1024]; in readFile() 64 int bytesRead = Os.read(fd, buf, 0, buf.length); in readFile() 65 assertLess("length of " + fileName + ":", bytesRead, buf.length); in readFile() 66 return new String(buf); in readFile()
|
/cts/tests/tests/opengl/libopengltest/ |
D | color_one.cpp | 58 char* buf = (char*) malloc(bufLength); in initColorOne() local 59 if (buf) { in initColorOne() 60 glGetProgramInfoLog(gProgram, bufLength, NULL, buf); in initColorOne() 61 LOGE("Could not link program:\n%s\n", buf); in initColorOne() 62 free(buf); in initColorOne()
|
/cts/tests/tests/renderscript/src/android/renderscript/cts/ |
D | large_global.rs | 18 char buf[2*1024*1024]; 22 buf[0] = c;
|
/cts/tests/tests/os/src/android/os/cts/ |
D | StrictModeTest.java | 91 final ByteArrayOutputStream buf = new ByteArrayOutputStream(); in readLogSince() local 92 Streams.copy(proc.getInputStream(), buf); in readLogSince() local 95 Log.d(TAG, "Log output was " + buf.size() + " bytes, exit code " + res); in readLogSince() 96 return new String(buf.toByteArray()); in readLogSince()
|
/cts/tests/tests/voiceinteraction/common/src/android/voiceinteraction/common/ |
D | Utils.java | 68 StringBuffer buf = new StringBuffer("Bundle is: "); in toBundleString() local 71 buf.append("testcase type = " + testType); in toBundleString() 76 buf.append(s + "\n\t\t"); in toBundleString() 79 return buf.toString(); in toBundleString()
|
/cts/libs/deviceutil/src/android/cts/util/ |
D | SystemUtil.java | 61 byte[] buf = new byte[512]; in runShellCommand() 65 while ((bytesRead = fis.read(buf)) != -1) { in runShellCommand() 66 stdout.append(new String(buf, 0, bytesRead)); in runShellCommand()
|
/cts/tools/signature-tools/src/signature/converter/doclet/ |
D | DocletFactory.java | 48 StringBuffer buf = new StringBuffer(); in loadApi() local 50 buf.append(filename); in loadApi() 51 buf.append(":"); in loadApi() 53 String sourcepath = buf.substring(0, buf.length() - 1); in loadApi()
|
/cts/tests/tests/assist/common/src/android/assist/common/ |
D | Utils.java | 187 StringBuffer buf = new StringBuffer("Bundle is: "); in toBundleString() local 190 buf.append("testcase type = " + testType); in toBundleString() 195 buf.append(s + "\n\t\t"); in toBundleString() 198 return buf.toString(); in toBundleString()
|
/cts/tests/tests/hardware/src/android/hardware/camera2/cts/rs/ |
D | raw_converter.rs | 195 static void load3x3(uint x, uint y, rs_allocation buf, /*out*/float* outputArray) { 196 outputArray[0] = *((ushort *) rsGetElementAt(buf, x - 1, y - 1)); 197 outputArray[1] = *((ushort *) rsGetElementAt(buf, x, y - 1)); 198 outputArray[2] = *((ushort *) rsGetElementAt(buf, x + 1, y - 1)); 199 outputArray[3] = *((ushort *) rsGetElementAt(buf, x - 1, y)); 200 outputArray[4] = *((ushort *) rsGetElementAt(buf, x, y)); 201 outputArray[5] = *((ushort *) rsGetElementAt(buf, x + 1, y)); 202 outputArray[6] = *((ushort *) rsGetElementAt(buf, x - 1, y + 1)); 203 outputArray[7] = *((ushort *) rsGetElementAt(buf, x, y + 1)); 204 outputArray[8] = *((ushort *) rsGetElementAt(buf, x + 1, y + 1));
|
/cts/tests/tests/media/src/android/media/cts/ |
D | AdaptivePlaybackTest.java | 751 static long checksum(ByteBuffer buf, int size, CRC32 crc) { 753 assertTrue(size <= buf.capacity()); 755 if (buf.hasArray()) { 756 crc.update(buf.array(), buf.arrayOffset(), size); 758 int pos = buf.position(); 759 buf.rewind(); 765 buf.get(bb, 0, chk); 768 buf.position(pos); 797 static String byteBufferToString(ByteBuffer buf, int start, int len) { 798 int oldPosition = buf.position(); [all …]
|
D | DecoderTest.java | 227 ByteBuffer[] buf = dec.getInputBuffers(); in testBFrames() local 242 int n = ex.readSampleData(buf[bufidx], 0); in testBFrames() 755 ByteBuffer buf = codecOutputBuffers[outputBufIndex]; in decodeToMemory() local 761 buf.position(info.offset); in decodeToMemory() 763 decoded[decodedIdx++] = buf.getShort(); in decodeToMemory() 1696 private static long checksum(ByteBuffer buf, int size) { in checksum() argument 1697 int cap = buf.capacity(); in checksum() 1701 if (buf.hasArray()) { in checksum() 1702 crc.update(buf.array(), buf.position() + buf.arrayOffset(), size); in checksum() 1704 int pos = buf.position(); in checksum() [all …]
|
D | TextureRender.java | 272 ByteBuffer buf = ByteBuffer.allocateDirect(width * height * 4); in saveFrame() local 273 buf.order(ByteOrder.LITTLE_ENDIAN); in saveFrame() 274 GLES20.glReadPixels(0, 0, width, height, GLES20.GL_RGBA, GLES20.GL_UNSIGNED_BYTE, buf); in saveFrame() 275 buf.rewind(); in saveFrame() 279 buf.asIntBuffer().get(colors); in saveFrame()
|
/cts/tests/tests/os/jni/seccomp-tests/tests/ |
D | sigsegv.c | 118 char buf[256]; in TRAP_action() local 131 len = snprintf(buf, sizeof(buf), in TRAP_action() 145 syscall(__NR_write, STDOUT_FILENO, buf, len); in TRAP_action()
|
/cts/tests/tests/media/libmediandkjni/ |
D | native-media-jni.cpp | 119 uint8_t *buf = new uint8_t[bufsize]; in testExtractor() local 121 int n = AMediaExtractor_readSampleData(ex, buf, bufsize); in testExtractor() 143 delete[] buf; in testExtractor() 269 uint8_t *buf = AMediaCodec_getInputBuffer(codec[t], bufidx, &bufsize); in Java_android_media_cts_NativeDecoderTest_getDecodedDataNative() local 270 int sampleSize = AMediaExtractor_readSampleData(ex, buf, bufsize); in Java_android_media_cts_NativeDecoderTest_getDecodedDataNative() 315 uint8_t *buf = AMediaCodec_getOutputBuffer(codec[tt], status, &bufsize); in Java_android_media_cts_NativeDecoderTest_getDecodedDataNative() local 316 int adler = checksum(buf, info.size, format[tt]); in Java_android_media_cts_NativeDecoderTest_getDecodedDataNative() 414 uint8_t *buf = AMediaCodec_getInputBuffer(codec, bufidx, &bufsize); in Java_android_media_cts_NativeDecoderTest_testPlaybackNative() local 415 int sampleSize = AMediaExtractor_readSampleData(ex, buf, bufsize); in Java_android_media_cts_NativeDecoderTest_testPlaybackNative() 496 uint8_t *buf = new uint8_t[bufsize]; in Java_android_media_cts_NativeDecoderTest_testMuxerNative() local [all …]
|
/cts/tools/dex-tools/src/dex/reader/ |
D | DexBuffer.java | 39 byte[] buf = new byte[1024]; in DexBuffer() 41 while ((len = bis.read(buf)) > 0) { in DexBuffer() 42 bos.write(buf, 0, len); in DexBuffer()
|
/cts/apps/CameraITS/pymodules/its/ |
D | device.py | 228 buf = None 231 buf = bytearray(n) 232 view = memoryview(buf) 237 buf = numpy.frombuffer(buf, dtype=numpy.uint8) 238 return jobj, buf 611 jsonObj,buf = self.__read_response_from_socket() 613 'raw10Image', 'dngImage'] and buf is not None: 615 bufs[fmt].append(buf)
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/sensors/ |
D | CtsMediaTextureRender.java | 276 ByteBuffer buf = ByteBuffer.allocateDirect(width * height * 4); in saveFrame() local 277 buf.order(ByteOrder.LITTLE_ENDIAN); in saveFrame() 278 GLES20.glReadPixels(0, 0, width, height, GLES20.GL_RGBA, GLES20.GL_UNSIGNED_BYTE, buf); in saveFrame() 279 buf.rewind(); in saveFrame() 283 buf.asIntBuffer().get(colors); in saveFrame()
|