/frameworks/compile/libbcc/include/bcinfo/Wrap/ |
H A D | BCHeaderField.h | 48 bool Write(uint8_t* buf, size_t buf_len) { argument 57 WriteFixedSubfield(static_cast<FixedSubfield>(ID_), buf); 59 buf + sizeof(FixedSubfield)); 60 memcpy(buf + kTagLenSize, data_, len_); 63 memset(buf + fields_len, 0, pad_len); 68 bool Read(const uint8_t* buf, size_t buf_len) { argument 71 ReadFixedSubfield(&field, buf); 73 ReadFixedSubfield(&field, buf + sizeof(FixedSubfield)); 76 memcpy(data_, buf + kTagLenSize, len_); 89 static size_t GetDataSizeFromSerialized(const uint8_t* buf) { argument 106 WriteFixedSubfield(FixedSubfield value, uint8_t* buf) argument 110 ReadFixedSubfield(FixedSubfield* value, const uint8_t* buf) argument [all...] |
/frameworks/compile/mclinker/include/mcld/Script/ |
H A D | FlexLexer.h | 138 virtual int LexerInput(char* buf, int max_size); 139 virtual void LexerOutput(const char* buf, int size);
|
/frameworks/compile/mclinker/lib/Script/ |
H A D | ScriptReader.cpp | 48 std::stringbuf buf(region.data()); 50 std::istream in(&buf);
|
/frameworks/compile/mclinker/lib/Target/Mips/ |
H A D | MipsAbiFlags.cpp | 33 auto* buf = reinterpret_cast<ElfMipsAbiFlags*>(pRegion.begin()); local 34 buf->version = 0; 35 buf->isa_level = pInfo.m_IsaLevel; 36 buf->isa_rev = pInfo.m_IsaRev; 37 buf->gpr_size = pInfo.m_GprSize; 38 buf->cpr1_size = pInfo.m_Cpr1Size; 39 buf->cpr2_size = pInfo.m_Cpr2Size; 40 buf->fp_abi = pInfo.m_FpAbi; 41 buf->isa_ext = pInfo.m_IsaExt; 42 buf [all...] |
/frameworks/base/services/backup/java/com/android/server/backup/ |
H A D | BackupManagerService.java | 1575 StringBuilder buf = new StringBuilder(data.length * 2); 1577 buf.append(Byte.toHexString(data[i], true)); 1579 return buf.toString(); 6289 StringBuilder buf = new StringBuilder(64); 6291 buf.append(String.format("%04x ", offset)); 6294 buf.append(String.format("%02x ", block[offset+i])); 6296 Slog.i("hexdump", buf.toString()); 6297 buf.setLength(0); 7661 StringBuilder buf = new StringBuilder(64); 7663 buf [all...] |
/frameworks/base/services/core/java/com/android/server/ |
H A D | DropBoxManagerService.java | 434 char[] buf = new char[4096]; 437 int n = isr.read(buf); 439 out.append(buf, 0, n); 440 newline = (buf[n - 1] == '\n');
|
/frameworks/base/services/core/java/com/android/server/am/ |
H A D | ActivityManagerService.java | 3773 StringBuilder buf = mStringBuilder; 3774 buf.setLength(0); 3775 buf.append("Start proc "); 3776 buf.append(startResult.pid); 3777 buf.append(':'); 3778 buf.append(app.processName); 3779 buf.append('/'); 3780 UserHandle.formatUid(buf, uid); 3782 buf.append(" ["); 3783 buf [all...] |
H A D | NativeCrashListener.java | 170 static int unpackInt(byte[] buf, int offset) { argument 173 b0 = ((int) buf[offset]) & 0xFF; // mask against sign extension 174 b1 = ((int) buf[offset+1]) & 0xFF; 175 b2 = ((int) buf[offset+2]) & 0xFF; 176 b3 = ((int) buf[offset+3]) & 0xFF; 200 final byte[] buf = new byte[4096]; 209 int headerBytes = readExactly(fd, buf, 0, 8); 216 int pid = unpackInt(buf, 0); 217 int signal = unpackInt(buf, 4); 240 bytes = Os.read(fd, buf, [all...] |
H A D | ProcessList.java | 307 ByteBuffer buf = ByteBuffer.allocate(4 * (2*mOomAdj.length + 1)); 308 buf.putInt(LMK_TARGET); 310 buf.putInt((mOomMinFree[i]*1024)/PAGE_SIZE); 311 buf.putInt(mOomAdj[i]); 314 writeLmkd(buf); 645 ByteBuffer buf = ByteBuffer.allocate(4 * 4); 646 buf.putInt(LMK_PROCPRIO); 647 buf.putInt(pid); 648 buf.putInt(uid); 649 buf 684 writeLmkd(ByteBuffer buf) argument [all...] |
/frameworks/base/services/core/java/com/android/server/connectivity/ |
H A D | KeepalivePacketData.java | 115 ByteBuffer buf = ByteBuffer.allocate(length); 116 buf.order(ByteOrder.BIG_ENDIAN); 117 buf.putShort((short) 0x4500); // IP version and TOS 118 buf.putShort((short) length); 119 buf.putInt(0); // ID, flags, offset 120 buf.put((byte) 64); // TTL 121 buf.put((byte) OsConstants.IPPROTO_UDP); 122 int ipChecksumOffset = buf.position(); 123 buf.putShort((short) 0); // IP checksum 124 buf [all...] |
/frameworks/base/services/core/java/com/android/server/display/ |
H A D | AutomaticBrightnessController.java | 733 StringBuffer buf = new StringBuffer(); 734 buf.append('['); 738 buf.append(", "); 740 buf.append(getLux(i)); 741 buf.append(" / "); 742 buf.append(next - getTime(i)); 743 buf.append("ms"); 745 buf.append(']'); 746 return buf.toString();
|
/frameworks/base/services/core/java/com/android/server/pm/ |
H A D | PackageManagerService.java | 18070 StringBuffer buf = new StringBuffer(128); 18071 buf.append('['); 18074 if (i > 0) buf.append(", "); 18075 buf.append(array[i]); 18078 buf.append(']'); 18079 return buf.toString();
|
H A D | PackageSignatures.java | 190 StringBuffer buf = new StringBuffer(128); 191 buf.append("PackageSignatures{"); 192 buf.append(Integer.toHexString(System.identityHashCode(this))); 193 buf.append(" ["); 196 if (i > 0) buf.append(", "); 197 buf.append(Integer.toHexString( 201 buf.append("]}"); 202 return buf.toString();
|
H A D | SELinuxMMAC.java | 326 final byte[] buf = new byte[20]; 327 final int len = Os.getxattr(file.getAbsolutePath(), XATTR_SEAPP_HASH, buf); 328 if ((len == 20) && Arrays.equals(SEAPP_CONTEXTS_HASH, buf)) {
|
H A D | UserManagerService.java | 2947 final byte[] buf = Integer.toString(serialNumber).getBytes(StandardCharsets.UTF_8); 2948 Os.setxattr(file.getAbsolutePath(), XATTR_SERIAL, buf, OsConstants.XATTR_CREATE); 2961 final byte[] buf = new byte[256]; 2962 final int len = Os.getxattr(file.getAbsolutePath(), XATTR_SERIAL, buf); 2963 final String serial = new String(buf, 0, len);
|
/frameworks/base/services/core/java/com/android/server/policy/ |
H A D | PhoneWindowManager.java | 5328 char[] buf = new char[15]; 5329 int n = reader.read(buf); 5331 plugged = 0 != Integer.parseInt(new String(buf, 0, n-1));
|
/frameworks/base/services/core/jni/ |
H A D | com_android_server_am_ActivityManagerService.cpp | 67 char buf[17]; local 68 while (fgets(buf, 16, fg_cpuset_file)) { 71 if (buf[i] == '\n') { 72 buf[i] = 0; 76 if (write(boost_cpuset_fd, buf, i) < 0) { 112 char buf[17]; local 113 while (fgets(buf, 16, boost_cpuset_file)) { 114 //ALOGE("Appending FD %s to fg", buf); 117 if (buf[i] == '\n') { 118 buf[ [all...] |
H A D | com_android_server_am_BatteryStatsService.cpp | 59 char buf[80]; local 60 strerror_r(errno, buf, sizeof(buf)); 61 ALOGE("Error posting wakeup sem: %s\n", buf); 78 char buf[80]; local 79 strerror_r(errno, buf, sizeof(buf)); 80 ALOGE("Error creating semaphore: %s\n", buf); 81 jniThrowException(env, "java/lang/IllegalStateException", buf); 92 char buf[8 local [all...] |
/frameworks/base/services/net/java/android/net/dhcp/ |
H A D | DhcpClient.java | 377 private boolean transmitPacket(ByteBuffer buf, String description, int encap, Inet4Address to) { argument 381 Os.sendto(mPacketSock, buf.array(), 0, buf.limit(), 0, mInterfaceBroadcastAddr); 390 Os.sendto(mUdpSock, buf, 0, to, DhcpPacket.DHCP_SERVER); 396 Os.write(mUdpSock, buf);
|
H A D | DhcpPacket.java | 354 Inet4Address srcIp, short destUdp, short srcUdp, ByteBuffer buf, 366 buf.clear(); 367 buf.order(ByteOrder.BIG_ENDIAN); 370 buf.put(ETHER_BROADCAST); 371 buf.put(mClientMac); 372 buf.putShort((short) OsConstants.ETH_P_IP); 379 ipHeaderOffset = buf.position(); 380 buf.put(IP_VERSION_HEADER_LEN); 381 buf.put(IP_TOS_LOWDELAY); // tos: IPTOS_LOWDELAY 382 ipLengthOffset = buf 353 fillInPacket(int encap, Inet4Address destIp, Inet4Address srcIp, short destUdp, short srcUdp, ByteBuffer buf, byte requestCode, boolean broadcast) argument 481 checksum(ByteBuffer buf, int seed, int start, int end) argument 523 addTlv(ByteBuffer buf, byte type, byte value) argument 532 addTlv(ByteBuffer buf, byte type, byte[] payload) argument 547 addTlv(ByteBuffer buf, byte type, Inet4Address addr) argument 556 addTlv(ByteBuffer buf, byte type, List<Inet4Address> addrs) argument 576 addTlv(ByteBuffer buf, byte type, Short value) argument 587 addTlv(ByteBuffer buf, byte type, Integer value) argument 598 addTlv(ByteBuffer buf, byte type, String str) argument 609 addTlvEnd(ByteBuffer buf) argument 629 addCommonClientTlvs(ByteBuffer buf) argument 685 readAsciiString(ByteBuffer buf, int byteCount, boolean nullOk) argument [all...] |
/frameworks/base/services/net/java/android/net/util/ |
H A D | IpUtils.java | 46 private static int checksum(ByteBuffer buf, int seed, int start, int end) { argument 48 final int bufPosition = buf.position(); 52 buf.position(start); 53 ShortBuffer shortBuf = buf.asShortBuffer(); 56 buf.position(bufPosition); 66 short b = buf.get(start); 83 ByteBuffer buf, int headerOffset, int protocol, int transportLen) { 85 partial += intAbs(buf.getShort(headerOffset + 12)); 86 partial += intAbs(buf.getShort(headerOffset + 14)); 87 partial += intAbs(buf 82 pseudoChecksumIPv4( ByteBuffer buf, int headerOffset, int protocol, int transportLen) argument 92 pseudoChecksumIPv6( ByteBuffer buf, int headerOffset, int protocol, int transportLen) argument 101 ipversion(ByteBuffer buf, int headerOffset) argument 105 ipChecksum(ByteBuffer buf, int headerOffset) argument 110 transportChecksum(ByteBuffer buf, int protocol, int ipOffset, int transportOffset, int transportLen) argument 132 udpChecksum(ByteBuffer buf, int ipOffset, int transportOffset) argument 137 tcpChecksum(ByteBuffer buf, int ipOffset, int transportOffset, int transportLen) argument [all...] |
/frameworks/base/services/tests/servicestests/src/android/net/ |
H A D | IpUtilsTest.java | 37 private int getUnsignedByte(ByteBuffer buf, int offset) { argument 38 return buf.get(offset) & 0xff; 41 private int getChecksum(ByteBuffer buf, int offset) { argument 42 return getUnsignedByte(buf, offset) * 256 + getUnsignedByte(buf, offset + 1);
|
/frameworks/base/services/tests/servicestests/src/com/android/server/ |
H A D | DropBoxTest.java | 107 byte[] buf = new byte[80]; 108 assertEquals("TEST", new String(buf, 0, e.getInputStream().read(buf)));
|
/frameworks/base/tests/Camera2Tests/CameraToo/tests/src/com/example/android/camera2/cameratoo/ |
H A D | CameraTooTest.java | 150 ByteBuffer buf = ByteBuffer.allocate(25); 151 for(int index = 0; index < buf.capacity(); ++index) 152 buf.put(index, (byte) index); 155 when(plane.getBuffer()).thenReturn(buf); 183 for(int count = 0; count < buf.capacity(); ++count) { 184 assertEquals(istream.read(), buf.get(count));
|
/frameworks/base/tests/CoreTests/android/core/ |
H A D | TestWebServer.java | 329 byte[] buf; field in class:TestWebServer.Worker 356 buf = new byte[BUF_SIZE]; 426 buf[i] = 0; 450 buf[read] = (byte)data; 455 if (buf[read++]==(byte)'\n') { 477 byte[] buf = new byte[length]; 481 count = is.read(buf, read, length-read); 510 if (buf[0] == (byte)'G' && 511 buf[1] == (byte)'E' && 512 buf[ [all...] |