/frameworks/base/tests/LargeAssetTest/src/com/android/largeassettest/ |
H A D | LargeAssetTest.java | 71 byte[] buf = new byte[4]; 74 int num = is.read(buf, 0, 4); 80 int value = (buf[3] << 24) + ((buf[2] & 0xFF) << 16) 81 + ((buf[1] & 0xFF) << 8) + (buf[0] & 0xFF);
|
/frameworks/av/media/img_utils/src/ |
H A D | ByteArrayOutput.cpp | 32 status_t ByteArrayOutput::write(const uint8_t* buf, size_t offset, size_t count) { argument 33 if (mByteArray.appendArray(buf + offset, count) < 0) {
|
/frameworks/base/packages/WallpaperCropper/src/com/android/gallery3d/exif/ |
H A D | ByteBufferInputStream.java | 26 public ByteBufferInputStream(ByteBuffer buf) { argument 27 mBuf = buf;
|
/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...] |
/frameworks/minikin/libs/minikin/ |
H A D | GraphemeBreak.cpp | 25 bool GraphemeBreak::isGraphemeBreak(const uint16_t* buf, size_t start, size_t count, argument 36 if (U16_IS_TRAIL(buf[offset])) { 43 U16_PREV(buf, start, offset_back, c1); 44 U16_NEXT(buf, offset, start + count, c2); 100 size_t GraphemeBreak::getTextRunCursor(const uint16_t* buf, size_t start, size_t count, argument 109 while (!isGraphemeBreak(buf, start, count, offset)) { 119 while (!isGraphemeBreak(buf, start, count, offset)) { 124 if (!isGraphemeBreak(buf, start, count, offset)) {
|
H A D | Measurement.cpp | 31 static float getRunAdvance(Layout& layout, const uint16_t* buf, size_t layoutStart, size_t start, argument 56 if (GraphemeBreak::isGraphemeBreak(buf, start, count, i)) { 70 float getRunAdvance(Layout& layout, const uint16_t* buf, size_t start, size_t count, argument 72 return getRunAdvance(layout, buf, start, start, count, offset); 83 size_t getOffsetForAdvance(Layout& layout, const uint16_t* buf, size_t start, size_t count, argument 88 if (GraphemeBreak::isGraphemeBreak(buf, start, count, i)) { 105 if (GraphemeBreak::isGraphemeBreak(buf, start, count, i)) { 106 // "getRunAdvance(layout, buf, start, count, i) - advance" but more efficient 107 float delta = getRunAdvance(layout, buf, start, searchStart, count - searchStart, i)
|
/frameworks/base/core/jni/ |
H A D | android_util_EventLog.cpp | 88 uint8_t buf[MAX_EVENT_PAYLOAD]; local 94 size_t max = sizeof(buf) - sizeof(len) - 2; // Type byte, final newline 97 buf[0] = EVENT_TYPE_STRING; 98 memcpy(&buf[1], &len, sizeof(len)); 99 memcpy(&buf[1 + sizeof(len)], str, len); 100 buf[1 + sizeof(len) + len] = '\n'; 103 return android_bWriteLog(tag, buf, 2 + sizeof(len) + len); 116 uint8_t buf[MAX_EVENT_PAYLOAD]; local 117 const size_t max = sizeof(buf) - 1; // leave room for final newline 128 buf[po [all...] |
H A D | android_hardware_SerialPort.cpp | 172 jbyte* buf = (jbyte *)malloc(length); local 173 if (!buf) { 178 int ret = read(fd, buf, length); 181 env->SetByteArrayRegion(buffer, 0, ret, buf); 184 free(buf); 195 jbyte* buf = (jbyte *)env->GetDirectBufferAddress(buffer); local 196 if (!buf) { 201 int ret = read(fd, buf, length); 211 jbyte* buf = (jbyte *)malloc(length); local 212 if (!buf) { 229 jbyte* buf = (jbyte *)env->GetDirectBufferAddress(buffer); local [all...] |
/frameworks/base/core/java/com/android/internal/os/ |
H A D | InstallerConnection.java | 44 private final byte buf[] = new byte[1024]; field in class:InstallerConnection 72 String s = new String(buf, 0, replyLength); 174 if (!readFully(buf, 2)) { 178 final int len = (((int) buf[0]) & 0xff) | ((((int) buf[1]) & 0xff) << 8); 179 if ((len < 1) || (len > buf.length)) { 185 if (!readFully(buf, len)) { 195 if ((len < 1) || (len > buf.length)) { 199 buf[0] = (byte) (len & 0xff); 200 buf[ [all...] |
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/ |
H A D | WifiParser.java | 88 ByteBuffer buf = ByteBuffer.wrap(ie.data); 101 if (0x0100 != buf.getShort(offset)) { 126 val = buf.getShort(offset); 140 val = buf.getShort(offset); 151 int akm = buf.getInt(offset); 199 ByteBuffer buf = ByteBuffer.wrap(ie.data); 201 if (buf.getInt(offset) != 0x01F25000) { 217 if (0x0100 != buf.getShort(offset)) { 241 val = buf.getShort(offset); 255 val = buf [all...] |
/frameworks/rs/ |
H A D | rsThreadIO.cpp | 81 uint32_t buf; local 83 data = &buf; 84 dataLen = sizeof(buf); 91 uint32_t buf; local 93 data = &buf; 94 dataLen = sizeof(buf); 108 uint8_t buf[2 * 1024]; local 109 const CoreCmdHeader *cmd = (const CoreCmdHeader *)&buf[0]; 110 const void * data = (const void *)&buf[sizeof(CoreCmdHeader)]; 138 r = mToCore.read(&buf[ [all...] |
/frameworks/base/libs/androidfw/ |
H A D | ZipUtils.cpp | 36 static inline unsigned long get4LE(const unsigned char* buf) { argument 37 return buf[0] | (buf[1] << 8) | (buf[2] << 16) | (buf[3] << 24); 52 * "buf" must hold at least "uncompressedLen" bytes. 54 /*static*/ template<typename T> bool inflateToBuffer(T& reader, void* buf, argument 77 zstream.next_out = (Bytef*) buf; 216 /*static*/ bool ZipUtils::inflateToBuffer(FILE* fp, void* buf, argument 220 return ::inflateToBuffer<FileReader>(reader, buf, 224 inflateToBuffer(int fd, void* buf, long uncompressedLen, long compressedLen) argument 232 inflateToBuffer(void* in, void* buf, long uncompressedLen, long compressedLen) argument 316 unsigned char buf[8]; local [all...] |
/frameworks/av/services/mediaresourcemanager/ |
H A D | ServiceLog.cpp | 36 char buf[64]; local 37 strftime(buf, sizeof(buf), "%m-%d %T", localtime(&now)); 38 mLogs.add(String8::format("%s %s", buf, log.string()));
|
/frameworks/base/core/java/android/text/method/ |
H A D | MultiTapKeyListener.java | 234 public void onSpanChanged(Spannable buf, argument 237 buf.removeSpan(TextKeyListener.ACTIVE); 238 removeTimeouts(buf); 242 private static void removeTimeouts(Spannable buf) { argument 243 Timeout[] timeout = buf.getSpans(0, buf.length(), Timeout.class); 250 buf.removeSpan(t); 267 Spannable buf = mBuffer; 269 if (buf != null) { 270 int st = Selection.getSelectionStart(buf); [all...] |
/frameworks/minikin/app/ |
H A D | HyphTool.cpp | 25 uint8_t* buf = new uint8_t[size]; local 26 size_t read_size = fread(buf, 1, size, f); 29 delete[] buf; 32 return Hyphenator::loadBinary(buf);
|
/frameworks/base/cmds/idmap/ |
H A D | idmap.cpp | 210 char buf[1024]; 211 buf[0] = '\0'; 213 strncat(buf, argv[i], sizeof(buf) - 1); 214 strncat(buf, " ", sizeof(buf) - 1); 216 ALOGD("%s:%d: uid=%d gid=%d argv=%s\n", __FILE__, __LINE__, getuid(), getgid(), buf);
|
/frameworks/native/libs/ui/ |
H A D | GraphicBuffer.cpp | 295 int32_t* buf = static_cast<int32_t*>(buffer); 296 buf[0] = 'GBFR'; 297 buf[1] = width; 298 buf[2] = height; 299 buf[3] = stride; 300 buf[4] = format; 301 buf[5] = usage; 302 buf[6] = static_cast<int32_t>(mId >> 32); 303 buf[7] = static_cast<int32_t>(mId & 0xFFFFFFFFull); 304 buf[ 331 int const* buf = static_cast<int const*>(buffer); local [all...] |
/frameworks/av/cmds/screenrecord/ |
H A D | FrameOutput.cpp | 32 inline void FrameOutput::setValueLE(uint8_t* buf, uint32_t value) { argument 37 buf[0] = (uint8_t) value; 38 buf[1] = (uint8_t) (value >> 8); 39 buf[2] = (uint8_t) (value >> 16); 40 buf[3] = (uint8_t) (value >> 24); 193 void FrameOutput::reduceRgbaToRgb(uint8_t* buf, unsigned int pixelCount) { argument 199 const uint8_t* readPtr = buf; 201 *buf++ = *readPtr++; 202 *buf++ = *readPtr++; 203 *buf [all...] |
/frameworks/native/opengl/tests/gl2_jni/jni/ |
H A D | gl_code.cpp | 48 char* buf = (char*) malloc(infoLen); local 49 if (buf) { 50 glGetShaderInfoLog(shader, infoLen, NULL, buf); 52 shaderType, buf); 53 free(buf); 87 char* buf = (char*) malloc(bufLength); local 88 if (buf) { 89 glGetProgramInfoLog(program, bufLength, NULL, buf); 90 ALOGE("Could not link program:\n%s\n", buf); 91 free(buf); [all...] |
/frameworks/native/opengl/tests/gldual/jni/ |
H A D | gl_code.cpp | 48 char* buf = (char*) malloc(infoLen); local 49 if (buf) { 50 glGetShaderInfoLog(shader, infoLen, NULL, buf); 52 shaderType, buf); 53 free(buf); 87 char* buf = (char*) malloc(bufLength); local 88 if (buf) { 89 glGetProgramInfoLog(program, bufLength, NULL, buf); 90 ALOGE("Could not link program:\n%s\n", buf); 91 free(buf); [all...] |
/frameworks/base/core/java/com/android/internal/util/ |
H A D | IndentingPrintWriter.java | 81 public void write(char[] buf, int offset, int count) { argument 89 char ch = buf[lineEnd++]; 93 super.write(buf, lineStart, lineEnd - lineStart); 109 super.write(buf, lineStart, lineEnd - lineStart); 120 super.write(buf, lineStart, lineEnd - lineStart);
|
/frameworks/native/opengl/libs/EGL/ |
H A D | egl_cache.cpp | 201 static uint32_t crc32c(const uint8_t* buf, size_t len) { argument 205 r ^= buf[i]; 247 uint8_t* buf = new uint8_t [fileSize]; local 248 if (!buf) { 256 status_t err = mBlobCache->flatten(buf + headerSize, cacheSize); 260 delete [] buf; 267 memcpy(buf, cacheFileMagic, 4); 268 uint32_t* crc = reinterpret_cast<uint32_t*>(buf + 4); 269 *crc = crc32c(buf + headerSize, cacheSize); 271 if (write(fd, buf, fileSiz 314 uint8_t* buf = reinterpret_cast<uint8_t*>(mmap(NULL, fileSize, local [all...] |
/frameworks/base/services/core/java/com/android/server/am/ |
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...] |
/frameworks/native/libs/gui/ |
H A D | CpuConsumer.cpp | 109 int buf = b.mBuf; local 114 PixelFormat format = mSlots[buf].mGraphicBuffer->getPixelFormat(); 118 err = mSlots[buf].mGraphicBuffer->lockAsyncYCbCr( 124 err = mSlots[buf].mGraphicBuffer->lockYCbCr( 144 err = mSlots[buf].mGraphicBuffer->lockAsync( 150 err = mSlots[buf].mGraphicBuffer->lock( 172 ab.mSlot = buf; 174 ab.mGraphicBuffer = mSlots[buf].mGraphicBuffer; 178 nativeBuffer->width = mSlots[buf].mGraphicBuffer->getWidth(); 179 nativeBuffer->height = mSlots[buf] [all...] |
/frameworks/av/media/img_utils/include/img_utils/ |
H A D | EndianUtils.h | 102 virtual status_t write(const uint8_t* buf, size_t offset, size_t count); 104 virtual status_t write(const int8_t* buf, size_t offset, size_t count); 106 virtual status_t write(const uint16_t* buf, size_t offset, size_t count); 108 virtual status_t write(const int16_t* buf, size_t offset, size_t count); 110 virtual status_t write(const uint32_t* buf, size_t offset, size_t count); 112 virtual status_t write(const int32_t* buf, size_t offset, size_t count); 114 virtual status_t write(const uint64_t* buf, size_t offset, size_t count); 116 virtual status_t write(const int64_t* buf, size_t offset, size_t count); 118 virtual status_t write(const float* buf, size_t offset, size_t count); 120 virtual status_t write(const double* buf, size_ 132 writeHelper(const T* buf, size_t offset, size_t count) argument [all...] |