Home
last modified time | relevance | path

Searched refs:buf (Results 1 – 25 of 110) sorted by relevance

12345

/packages/apps/Mms/src/com/android/mms/util/
DBlobCache.java197 byte[] buf = mIndexHeader; in loadIndex()
198 if (mIndexFile.read(buf) != INDEX_HEADER_SIZE) { in loadIndex()
203 if (readInt(buf, IH_MAGIC) != MAGIC_INDEX_FILE) { in loadIndex()
208 if (readInt(buf, IH_VERSION) != mVersion) { in loadIndex()
213 mMaxEntries = readInt(buf, IH_MAX_ENTRIES); in loadIndex()
214 mMaxBytes = readInt(buf, IH_MAX_BYTES); in loadIndex()
215 mActiveRegion = readInt(buf, IH_ACTIVE_REGION); in loadIndex()
216 mActiveEntries = readInt(buf, IH_ACTIVE_ENTRIES); in loadIndex()
217 mActiveBytes = readInt(buf, IH_ACTIVE_BYTES); in loadIndex()
219 int sum = readInt(buf, IH_CHECKSUM); in loadIndex()
[all …]
/packages/apps/Gallery2/gallerycommon/src/com/android/gallery3d/common/
DBlobCache.java196 byte[] buf = mIndexHeader; in loadIndex()
197 if (mIndexFile.read(buf) != INDEX_HEADER_SIZE) { in loadIndex()
202 if (readInt(buf, IH_MAGIC) != MAGIC_INDEX_FILE) { in loadIndex()
207 if (readInt(buf, IH_VERSION) != mVersion) { in loadIndex()
212 mMaxEntries = readInt(buf, IH_MAX_ENTRIES); in loadIndex()
213 mMaxBytes = readInt(buf, IH_MAX_BYTES); in loadIndex()
214 mActiveRegion = readInt(buf, IH_ACTIVE_REGION); in loadIndex()
215 mActiveEntries = readInt(buf, IH_ACTIVE_ENTRIES); in loadIndex()
216 mActiveBytes = readInt(buf, IH_ACTIVE_BYTES); in loadIndex()
218 int sum = readInt(buf, IH_CHECKSUM); in loadIndex()
[all …]
/packages/apps/CellBroadcastReceiver/src/com/android/cellbroadcastreceiver/
DCellBroadcastResources.java42 SpannableStringBuilder buf = new SpannableStringBuilder(); in getMessageDetails() local
45 int start = buf.length(); in getMessageDetails()
46 buf.append(context.getString(R.string.delivery_time_heading)); in getMessageDetails()
47 int end = buf.length(); in getMessageDetails()
48 buf.setSpan(new StyleSpan(Typeface.BOLD), start, end, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); in getMessageDetails()
49 buf.append(" "); in getMessageDetails()
50 buf.append(cbm.getDateString(context)); in getMessageDetails()
54 appendCmasAlertDetails(context, buf, cbm.getCmasWarningInfo()); in getMessageDetails()
57 return buf; in getMessageDetails()
60 private static void appendCmasAlertDetails(Context context, SpannableStringBuilder buf, in appendCmasAlertDetails() argument
[all …]
/packages/apps/Gallery2/jni_jpegstream/src/
Djpeg_reader.cpp179 void JpegReader::formatPixels(uint8_t* buf, int32_t len) { in formatPixels() argument
180 uint8_t *iter = buf; in formatPixels()
188 c = buf[i + 0]; in formatPixels()
189 m = buf[i + 1]; in formatPixels()
190 y = buf[i + 2]; in formatPixels()
191 k = buf[i + 3]; in formatPixels()
218 uint8_t* end = buf + len - 1; in formatPixels()
220 buf[i] = 255; in formatPixels()
221 buf[i - 1] = *--iter; in formatPixels()
222 buf[i - 2] = *--iter; in formatPixels()
[all …]
Djpeg_writer.cpp166 void JpegWriter::formatPixels(uint8_t* buf, int32_t len) { in formatPixels() argument
169 uint8_t* d = buf; in formatPixels()
173 for (int i = 0; i < len / 4; ++i, buf += 4) { in formatPixels()
174 *d++ = buf[0]; in formatPixels()
175 *d++ = buf[1]; in formatPixels()
176 *d++ = buf[2]; in formatPixels()
183 *d++ = buf[3]; in formatPixels()
185 *d++ = buf[2]; in formatPixels()
188 for (int i = 1; i < len / 4; ++i, buf += 4) { in formatPixels()
189 *d++ = buf[3]; in formatPixels()
[all …]
/packages/experimental/procstatlog/
Dprocstatlog.c73 char buf[4096]; in read_data() local
81 int len = read(fd, buf, sizeof(buf)); in read_data()
90 while (len > 0 && isspace(buf[len - 1])) --len; in read_data()
92 memcpy(data->value, buf, len); in read_data()
106 char buf[8192]; in read_lines() local
110 int len = read(fd, buf, sizeof(buf) - 1); in read_lines()
116 buf[len] = '\0'; in read_lines()
120 char *end = strstr(buf, terminator); in read_lines()
127 for (line = strtok(buf, "\n"); in read_lines()
161 char buf[8192]; in read_proc_yaffs() local
[all …]
/packages/apps/Mms/src/com/android/mms/ui/
DConversationListItem.java108 SpannableStringBuilder buf = new SpannableStringBuilder(from); in formatMessage() local
111 int before = buf.length(); in formatMessage()
112 buf.append(mContext.getResources().getString(R.string.message_count_format, in formatMessage()
114 buf.setSpan(new ForegroundColorSpan( in formatMessage()
116 before, buf.length(), Spannable.SPAN_INCLUSIVE_EXCLUSIVE); in formatMessage()
119 buf.append(mContext.getResources().getString(R.string.draft_separator)); in formatMessage()
120 int before = buf.length(); in formatMessage()
122 buf.append(mContext.getResources().getString(R.string.has_draft)); in formatMessage()
124 buf.setSpan(new TextAppearanceSpan(mContext, size, color), before, in formatMessage()
125 buf.length(), Spannable.SPAN_INCLUSIVE_EXCLUSIVE); in formatMessage()
[all …]
/packages/apps/UnifiedEmail/src/org/apache/james/mime4j/decoder/
DByteQueue.java26 private UnboundedFifoByteBuffer buf; field in ByteQueue
30 buf = new UnboundedFifoByteBuffer(); in ByteQueue()
34 buf = new UnboundedFifoByteBuffer(initialCapacity); in ByteQueue()
39 buf.add(b); in enqueue()
43 return buf.remove(); in dequeue()
47 return buf.size(); in count()
52 buf = new UnboundedFifoByteBuffer(initialCapacity); in clear()
54 buf = new UnboundedFifoByteBuffer(); in clear()
58 return buf.iterator(); in iterator()
/packages/apps/LegacyCamera/jni/feature_mos/src/mosaic_renderer/
DRenderer.cpp49 char* buf = (char*) malloc(infoLen); in loadShader() local
50 if (buf) { in loadShader()
51 glGetShaderInfoLog(shader, infoLen, NULL, buf); in loadShader()
53 shaderType, buf); in loadShader()
54 free(buf); in loadShader()
98 char* buf = (char*) malloc(bufLength); in createProgram() local
99 if (buf) in createProgram()
101 glGetProgramInfoLog(program, bufLength, NULL, buf); in createProgram()
102 LOGE("Could not link program:\n%s\n", buf); in createProgram()
103 free(buf); in createProgram()
/packages/apps/Camera/jni/feature_mos/src/mosaic_renderer/
DRenderer.cpp49 char* buf = (char*) malloc(infoLen); in loadShader() local
50 if (buf) { in loadShader()
51 glGetShaderInfoLog(shader, infoLen, NULL, buf); in loadShader()
53 shaderType, buf); in loadShader()
54 free(buf); in loadShader()
98 char* buf = (char*) malloc(bufLength); in createProgram() local
99 if (buf) in createProgram()
101 glGetProgramInfoLog(program, bufLength, NULL, buf); in createProgram()
102 LOGE("Could not link program:\n%s\n", buf); in createProgram()
103 free(buf); in createProgram()
/packages/services/Telephony/src/com/android/phone/settings/fdn/
DDeleteFdnContactScreen.java109 StringBuilder buf = new StringBuilder(); in deleteContact() local
111 buf.append("number='"); in deleteContact()
113 buf.append("tag='"); in deleteContact()
114 buf.append(mName); in deleteContact()
115 buf.append("' AND number='"); in deleteContact()
117 buf.append(mNumber); in deleteContact()
118 buf.append("' AND pin2='"); in deleteContact()
119 buf.append(mPin2); in deleteContact()
120 buf.append("'"); in deleteContact()
125 mQueryHandler.startDelete(0, null, uri, buf.toString(), null); in deleteContact()
/packages/apps/Launcher3/WallpaperPicker/src/com/android/gallery3d/exif/
DExifTag.java332 byte[] buf = value.getBytes(US_ASCII); in setValue()
333 byte[] finalBuf = buf; in setValue()
334 if (buf.length > 0) { in setValue()
335 finalBuf = (buf[buf.length - 1] == 0 || mDataType == TYPE_UNDEFINED) ? buf : Arrays in setValue()
336 .copyOf(buf, buf.length + 1); in setValue()
836 protected void getBytes(byte[] buf) { in getBytes() argument
837 getBytes(buf, 0, buf.length); in getBytes()
850 protected void getBytes(byte[] buf, int offset, int length) { in getBytes() argument
855 System.arraycopy(mValue, 0, buf, offset, in getBytes()
DExifModifier.java155 byte buf[] = tag.getStringByte(); in writeTagValue()
156 if (buf.length == tag.getComponentCount()) { in writeTagValue()
157 buf[buf.length - 1] = 0; in writeTagValue()
158 mByteBuffer.put(buf); in writeTagValue()
160 mByteBuffer.put(buf); in writeTagValue()
180 buf = new byte[tag.getComponentCount()]; in writeTagValue()
181 tag.getBytes(buf); in writeTagValue()
182 mByteBuffer.put(buf); in writeTagValue()
DExifReader.java72 byte buf[] = new byte[parser.getCompressedImageSize()]; in read()
73 if (buf.length == parser.read(buf)) { in read()
74 exifData.setCompressedThumbnail(buf); in read()
80 buf = new byte[parser.getStripSize()]; in read()
81 if (buf.length == parser.read(buf)) { in read()
82 exifData.setStripBytes(parser.getStripIndex(), buf); in read() local
/packages/apps/Gallery2/gallerycommon/src/com/android/gallery3d/exif/
DExifTag.java332 byte[] buf = value.getBytes(US_ASCII); in setValue()
333 byte[] finalBuf = buf; in setValue()
334 if (buf.length > 0) { in setValue()
335 finalBuf = (buf[buf.length - 1] == 0 || mDataType == TYPE_UNDEFINED) ? buf : Arrays in setValue()
336 .copyOf(buf, buf.length + 1); in setValue()
836 protected void getBytes(byte[] buf) { in getBytes() argument
837 getBytes(buf, 0, buf.length); in getBytes()
850 protected void getBytes(byte[] buf, int offset, int length) { in getBytes() argument
855 System.arraycopy(mValue, 0, buf, offset, in getBytes()
DExifModifier.java156 byte buf[] = tag.getStringByte(); in writeTagValue()
157 if (buf.length == tag.getComponentCount()) { in writeTagValue()
158 buf[buf.length - 1] = 0; in writeTagValue()
159 mByteBuffer.put(buf); in writeTagValue()
161 mByteBuffer.put(buf); in writeTagValue()
181 buf = new byte[tag.getComponentCount()]; in writeTagValue()
182 tag.getBytes(buf); in writeTagValue()
183 mByteBuffer.put(buf); in writeTagValue()
DExifReader.java72 byte buf[] = new byte[parser.getCompressedImageSize()]; in read()
73 if (buf.length == parser.read(buf)) { in read()
74 exifData.setCompressedThumbnail(buf); in read()
80 buf = new byte[parser.getStripSize()]; in read()
81 if (buf.length == parser.read(buf)) { in read()
82 exifData.setStripBytes(parser.getStripIndex(), buf); in read() local
/packages/apps/Mms/src/com/android/mms/exif/
DExifTag.java332 byte[] buf = value.getBytes(US_ASCII); in setValue()
333 byte[] finalBuf = buf; in setValue()
334 if (buf.length > 0) { in setValue()
335 finalBuf = (buf[buf.length - 1] == 0 || mDataType == TYPE_UNDEFINED) ? buf : Arrays in setValue()
336 .copyOf(buf, buf.length + 1); in setValue()
836 protected void getBytes(byte[] buf) { in getBytes() argument
837 getBytes(buf, 0, buf.length); in getBytes()
850 protected void getBytes(byte[] buf, int offset, int length) { in getBytes() argument
855 System.arraycopy(mValue, 0, buf, offset, in getBytes()
DExifModifier.java157 byte buf[] = tag.getStringByte(); in writeTagValue()
158 if (buf.length == tag.getComponentCount()) { in writeTagValue()
159 buf[buf.length - 1] = 0; in writeTagValue()
160 mByteBuffer.put(buf); in writeTagValue()
162 mByteBuffer.put(buf); in writeTagValue()
182 buf = new byte[tag.getComponentCount()]; in writeTagValue()
183 tag.getBytes(buf); in writeTagValue()
184 mByteBuffer.put(buf); in writeTagValue()
DExifReader.java74 byte buf[] = new byte[parser.getCompressedImageSize()]; in read()
75 if (buf.length == parser.read(buf)) { in read()
76 exifData.setCompressedThumbnail(buf); in read()
82 buf = new byte[parser.getStripSize()]; in read()
83 if (buf.length == parser.read(buf)) { in read()
84 exifData.setStripBytes(parser.getStripIndex(), buf); in read() local
/packages/apps/Camera2/src/com/android/camera/exif/
DExifTag.java332 byte[] buf = value.getBytes(US_ASCII); in setValue()
333 byte[] finalBuf = buf; in setValue()
334 if (buf.length > 0) { in setValue()
335 finalBuf = (buf[buf.length - 1] == 0 || mDataType == TYPE_UNDEFINED) ? buf : Arrays in setValue()
336 .copyOf(buf, buf.length + 1); in setValue()
836 protected void getBytes(byte[] buf) { in getBytes() argument
837 getBytes(buf, 0, buf.length); in getBytes()
850 protected void getBytes(byte[] buf, int offset, int length) { in getBytes() argument
855 System.arraycopy(mValue, 0, buf, offset, in getBytes()
DExifModifier.java155 byte buf[] = tag.getStringByte(); in writeTagValue()
156 if (buf.length == tag.getComponentCount()) { in writeTagValue()
157 buf[buf.length - 1] = 0; in writeTagValue()
158 mByteBuffer.put(buf); in writeTagValue()
160 mByteBuffer.put(buf); in writeTagValue()
180 buf = new byte[tag.getComponentCount()]; in writeTagValue()
181 tag.getBytes(buf); in writeTagValue()
182 mByteBuffer.put(buf); in writeTagValue()
/packages/apps/Nfc/nxp/jni/
Dcom_android_nfc_NativeNfcTag.cpp182 jbyteArray buf = NULL; in com_android_nfc_NativeNfcTag_doRead() local
224 buf = e->NewByteArray(nfc_jni_ndef_rw.length); in com_android_nfc_NativeNfcTag_doRead()
225 e->SetByteArrayRegion(buf, 0, nfc_jni_ndef_rw.length, in com_android_nfc_NativeNfcTag_doRead()
232 return buf; in com_android_nfc_NativeNfcTag_doRead()
237 jobject o, jbyteArray buf) in com_android_nfc_NativeNfcTag_doWrite() argument
253 nfc_jni_ndef_rw.length = (uint32_t)e->GetArrayLength(buf); in com_android_nfc_NativeNfcTag_doWrite()
254 nfc_jni_ndef_rw.buffer = (uint8_t *)e->GetByteArrayElements(buf, NULL); in com_android_nfc_NativeNfcTag_doWrite()
284 e->ReleaseByteArrayElements(buf, (jbyte *)nfc_jni_ndef_rw.buffer, JNI_ABORT); in com_android_nfc_NativeNfcTag_doWrite()
702 uint8_t *buf = NULL; in com_android_nfc_NativeNfcTag_doTransceive() local
740 buf = outbuf = (uint8_t *)e->GetByteArrayElements(data, NULL); in com_android_nfc_NativeNfcTag_doTransceive()
[all …]
Dcom_android_nfc_NativeP2pDevice.cpp274 uint8_t *buf; in com_android_nfc_NativeP2pDevice_doTransceive() local
293 buf = (uint8_t *)e->GetByteArrayElements(data, NULL); in com_android_nfc_NativeP2pDevice_doTransceive()
298 transceive_info.sSendData.buffer = buf; //+ offset; in com_android_nfc_NativeP2pDevice_doTransceive()
361 jbyteArray buf = NULL; in com_android_nfc_NativeP2pDevice_doReceive() local
399 buf = e->NewByteArray(data->length); in com_android_nfc_NativeP2pDevice_doReceive()
400 e->SetByteArrayRegion(buf, 0, data->length, (jbyte *)data->buffer); in com_android_nfc_NativeP2pDevice_doReceive()
405 return buf; in com_android_nfc_NativeP2pDevice_doReceive()
409 JNIEnv *e, jobject o, jbyteArray buf) in com_android_nfc_NativeP2pDevice_doSend() argument
429 data.length = (uint32_t)e->GetArrayLength(buf); in com_android_nfc_NativeP2pDevice_doSend()
430 data.buffer = (uint8_t *)e->GetByteArrayElements(buf, NULL); in com_android_nfc_NativeP2pDevice_doSend()
[all …]
/packages/apps/Gallery2/jni/filters/
Dedge.c43 char buf[buf_len]; in JNIFUNCF() local
47 memset(buf, 0, buf_len * sizeof(char)); in JNIFUNCF()
49 *(buf + j) = 255; // set initial alphas in JNIFUNCF()
100 *(buf + buf_row_ring + off) = ret; in JNIFUNCF()
101 *(buf + buf_row_ring + off + 1) = ret; in JNIFUNCF()
102 *(buf + buf_row_ring + off + 2) = ret; in JNIFUNCF()
103 *(buf + buf_row_ring + off + 3) = *(ptr + loc + 3); in JNIFUNCF()
110 memcpy((dst + row_stride * (j - 1)), (buf + buf_row_ring), row_stride * sizeof(char)); in JNIFUNCF()
117 memcpy((dst + second_last_row), (buf + buf_row_ring), row_stride * sizeof(char)); in JNIFUNCF()

12345