/packages/apps/UnifiedEmail/src/org/apache/james/mime4j/codec/ |
D | EncoderUtil.java | 336 byte[] bytes = encode(text, charset); in encodeEncodedWord() 339 encoding = determineEncoding(bytes, usage); in encodeEncodedWord() 343 return encodeB(prefix, text, usedCharacters, charset, bytes); in encodeEncodedWord() 346 return encodeQ(prefix, text, usage, usedCharacters, charset, bytes); in encodeEncodedWord() 358 public static String encodeB(byte[] bytes) { in encodeB() argument 362 final int end = bytes.length; in encodeB() 364 int data = (bytes[idx] & 0xff) << 16 | (bytes[idx + 1] & 0xff) << 8 in encodeB() 365 | bytes[idx + 2] & 0xff; in encodeB() 373 int data = (bytes[idx] & 0xff) << 16 | (bytes[idx + 1] & 0xff) << 8; in encodeB() 380 int data = (bytes[idx] & 0xff) << 16; in encodeB() [all …]
|
/packages/apps/Nfc/src/com/android/nfc/snep/ |
D | SnepMessage.java | 157 byte[] bytes = new byte[ndefLength]; in SnepMessage() 158 System.arraycopy(data, ndefOffset, bytes, 0, ndefLength); in SnepMessage() 159 mNdefMessage = new NdefMessage(bytes); in SnepMessage() 175 byte[] bytes; in toByteArray() 179 bytes = mNdefMessage.toByteArray(); in toByteArray() 182 bytes = NDEF_SHORT_TEST_RECORD; in toByteArray() 184 bytes = NDEF_TEST_RECORD; in toByteArray() 188 bytes = mNdefMessage.toByteArray(); in toByteArray() 191 bytes = new byte[0]; in toByteArray() 197 buffer = new ByteArrayOutputStream(bytes.length + HEADER_LENGTH + 4); in toByteArray() [all …]
|
/packages/apps/Gallery2/gallerycommon/src/com/android/gallery3d/common/ |
D | Fingerprint.java | 67 public Fingerprint(byte[] bytes) { in Fingerprint() argument 68 if ((bytes == null) || (bytes.length != FINGERPRINT_BYTE_LENGTH)) { in Fingerprint() 71 mMd5Digest = bytes; in Fingerprint() 87 byte[] bytes = new byte[8192]; in fromInputStream() 90 int n = in.read(bytes); in fromInputStream() 112 byte[] bytes = new byte[FINGERPRINT_BYTE_LENGTH]; in fromStreamId() 117 bytes[byteIdx++] = (byte) (value & 0xff); in fromStreamId() 119 return new Fingerprint(bytes); in fromStreamId() 180 private static void appendHexFingerprint(StringBuilder sb, byte[] bytes) { in appendHexFingerprint() argument 182 int value = bytes[idx]; in appendHexFingerprint()
|
/packages/apps/Contacts/src/com/android/contacts/ |
D | ContactPhotoManager.java | 619 final byte[] bytes; field in ContactPhotoManagerImpl.BitmapHolder 627 public BitmapHolder(byte[] bytes, int originalSmallerExtent) { in BitmapHolder() argument 628 this.bytes = bytes; in BitmapHolder() 730 return value.bytes != null ? value.bytes.length : 0; in ContactPhotoManagerImpl() 756 private static String btk(int bytes) { in btk() argument 757 return ((bytes + 1023) / 1024) + "K"; in btk() 776 if (h.bytes != null) { in dumpStats() 777 rawBytes += h.bytes.length; in dumpStats() 940 if (holder.bytes == null || holder.bytes.length == 0) { in loadCachedPhoto() 947 if (holder.bytes.length < 8 * 1024) { in loadCachedPhoto() [all …]
|
/packages/apps/Dialer/java/com/android/dialer/contactphoto/ |
D | ContactPhotoManagerImpl.java | 176 return value.bytes != null ? value.bytes.length : 0; in ContactPhotoManagerImpl() 207 private static String btk(int bytes) { in btk() argument 208 return ((bytes + 1023) / 1024) + "K"; in btk() 230 byte[] bytes = holder.bytes; in inflateBitmap() 231 if (bytes == null || bytes.length == 0) { in inflateBitmap() 247 Bitmap bitmap = BitmapUtil.decodeBitmapFromBytes(bytes, sampleSize); in inflateBitmap() 286 + btk(bytes.length) in inflateBitmap() 311 if (h.bytes != null) { in dumpStats() 312 rawBytes += h.bytes.length; in dumpStats() 530 if (holder.bytes == null) { in loadCachedPhoto() [all …]
|
D | BitmapUtil.java | 37 public static int getSmallerExtentFromBytes(byte[] bytes) { in getSmallerExtentFromBytes() argument 42 BitmapFactory.decodeByteArray(bytes, 0, bytes.length, options); in getSmallerExtentFromBytes() 80 public static Bitmap decodeBitmapFromBytes(byte[] bytes, int sampleSize) { in decodeBitmapFromBytes() argument 88 return BitmapFactory.decodeByteArray(bytes, 0, bytes.length, options); in decodeBitmapFromBytes()
|
/packages/apps/Messaging/src/com/android/messaging/mmslib/pdu/ |
D | QuotedPrintable.java | 39 public static final byte[] decodeQuotedPrintable(byte[] bytes) { in decodeQuotedPrintable() argument 40 if (bytes == null) { in decodeQuotedPrintable() 44 for (int i = 0; i < bytes.length; i++) { in decodeQuotedPrintable() 45 int b = bytes[i]; in decodeQuotedPrintable() 48 if ('\r' == (char) bytes[i + 1] && in decodeQuotedPrintable() 49 '\n' == (char) bytes[i + 2]) { in decodeQuotedPrintable() 53 int u = Character.digit((char) bytes[++i], 16); in decodeQuotedPrintable() 54 int l = Character.digit((char) bytes[++i], 16); in decodeQuotedPrintable()
|
/packages/apps/Messaging/src/android/support/v7/mms/pdu/ |
D | QuotedPrintable.java | 39 public static final byte[] decodeQuotedPrintable(byte[] bytes) { in decodeQuotedPrintable() argument 40 if (bytes == null) { in decodeQuotedPrintable() 44 for (int i = 0; i < bytes.length; i++) { in decodeQuotedPrintable() 45 int b = bytes[i]; in decodeQuotedPrintable() 48 if('\r' == (char)bytes[i + 1] && in decodeQuotedPrintable() 49 '\n' == (char)bytes[i + 2]) { in decodeQuotedPrintable() 53 int u = Character.digit((char) bytes[++i], 16); in decodeQuotedPrintable() 54 int l = Character.digit((char) bytes[++i], 16); in decodeQuotedPrintable()
|
/packages/apps/LegacyCamera/jni/ |
D | feature_mos_jni.cpp | 406 jfloatArray bytes = env->NewFloatArray(11); in Java_com_android_camera_panorama_Mosaic_setSourceImageFromGPU() local 407 if(bytes != 0) in Java_com_android_camera_panorama_Mosaic_setSourceImageFromGPU() 409 env->SetFloatArrayRegion(bytes, 0, 11, (jfloat*) gTRS); in Java_com_android_camera_panorama_Mosaic_setSourceImageFromGPU() 411 return bytes; in Java_com_android_camera_panorama_Mosaic_setSourceImageFromGPU() 465 jfloatArray bytes = env->NewFloatArray(11); in Java_com_android_camera_panorama_Mosaic_setSourceImage() local 466 if(bytes != 0) in Java_com_android_camera_panorama_Mosaic_setSourceImage() 468 env->SetFloatArrayRegion(bytes, 0, 11, (jfloat*) gTRS); in Java_com_android_camera_panorama_Mosaic_setSourceImage() 470 return bytes; in Java_com_android_camera_panorama_Mosaic_setSourceImage() 603 jintArray bytes = env->NewIntArray(imageSize+2); in Java_com_android_camera_panorama_Mosaic_getFinalMosaic() local 604 if (bytes == 0) { in Java_com_android_camera_panorama_Mosaic_getFinalMosaic() [all …]
|
/packages/apps/SettingsIntelligence/src/com/android/settings/intelligence/search/ |
D | ResultPayloadUtils.java | 33 byte[] bytes = parcel.marshall(); in marshall() 35 return bytes; in marshall() 38 public static <T> T unmarshall(byte[] bytes, Parcelable.Creator<T> creator) { in unmarshall() argument 40 Parcel parcel = unmarshall(bytes); in unmarshall() 46 private static Parcel unmarshall(byte[] bytes) { in unmarshall() argument 48 parcel.unmarshall(bytes, 0, bytes.length); in unmarshall()
|
/packages/apps/TV/src/com/android/tv/data/ |
D | InternalDataUtils.java | 52 public static void deserializeInternalProviderData(byte[] bytes, Program.Builder builder) { in deserializeInternalProviderData() argument 53 if (bytes == null || bytes.length == 0) { in deserializeInternalProviderData() 56 try (ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(bytes))) { in deserializeInternalProviderData() 102 byte[] bytes, RecordedProgram.Builder builder) { in deserializeInternalProviderData() argument 103 if (bytes == null || bytes.length == 0) { in deserializeInternalProviderData() 106 try (ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(bytes))) { in deserializeInternalProviderData()
|
/packages/apps/CertInstaller/src/com/android/certinstaller/ |
D | CredentialHelper.java | 98 byte[] bytes = bundle.getByteArray(key); in CredentialHelper() 99 Log.d(TAG, " " + key + ": " + ((bytes == null) ? -1 : bytes.length)); in CredentialHelper() 100 mBundle.put(key, bytes); in CredentialHelper() 150 private void parseCert(byte[] bytes) { in parseCert() argument 151 if (bytes == null) { in parseCert() 159 new ByteArrayInputStream(bytes)); in parseCert() 210 void setPrivateKey(String algorithm, byte[] bytes) { in setPrivateKey() argument 213 mUserKey = keyFactory.generatePrivate(new PKCS8EncodedKeySpec(bytes)); in setPrivateKey() 315 byte[] bytes = null; in installVpnAndAppsTrustAnchors() 317 bytes = caCert.getEncoded(); in installVpnAndAppsTrustAnchors() [all …]
|
D | Util.java | 47 static <T> T fromBytes(byte[] bytes) { in fromBytes() argument 48 if (bytes == null) return null; in fromBytes() 51 new ObjectInputStream(new ByteArrayInputStream(bytes)); in fromBytes() 59 static String toMd5(byte[] bytes) { in toMd5() argument 63 algorithm.update(bytes); in toMd5() 72 private static String toHexString(byte[] bytes, String separator) { in toHexString() argument 74 for (byte b : bytes) { in toHexString()
|
/packages/apps/Dialer/java/com/android/dialer/callcomposer/camera/ |
D | ImagePersistWorker.java | 43 private final byte[] bytes; field in ImagePersistWorker 76 final byte[] bytes, in ImagePersistWorker() argument 79 Assert.isNotNull(bytes); in ImagePersistWorker() 84 this.bytes = bytes; in ImagePersistWorker() 109 exifInterface.readExif(bytes); in writeClippedBitmap() 119 Bitmap bitmap = BitmapFactory.decodeByteArray(bytes, 0, bytes.length); in writeClippedBitmap()
|
/packages/apps/Gallery2/src/com/android/gallery3d/data/ |
D | DecodeUtils.java | 77 public static Bitmap decode(JobContext jc, byte[] bytes, Options options) { in decode() argument 78 return decode(jc, bytes, 0, bytes.length, options); in decode() 81 public static Bitmap decode(JobContext jc, byte[] bytes, int offset, in decode() argument 87 BitmapFactory.decodeByteArray(bytes, offset, length, options)); in decode() 90 public static void decodeBounds(JobContext jc, byte[] bytes, int offset, in decodeBounds() argument 95 BitmapFactory.decodeByteArray(bytes, offset, length, options); in decodeBounds() 199 JobContext jc, byte[] bytes, int offset, int length, in createBitmapRegionDecoder() argument 201 if (offset < 0 || length <= 0 || offset + length > bytes.length) { in createBitmapRegionDecoder() 204 offset, length, bytes.length)); in createBitmapRegionDecoder() 209 bytes, offset, length, shareable); in createBitmapRegionDecoder()
|
/packages/apps/Bluetooth/jni/ |
D | com_android_bluetooth.h | 58 bool isValidUtf(const char* bytes) const { in isValidUtf() argument 59 while (*bytes != '\0') { in isValidUtf() 60 const uint8_t* utf8 = reinterpret_cast<const uint8_t*>(bytes++); in isValidUtf() 85 utf8 = reinterpret_cast<const uint8_t*>(bytes++); in isValidUtf() 97 utf8 = reinterpret_cast<const uint8_t*>(bytes++); in isValidUtf() 106 utf8 = reinterpret_cast<const uint8_t*>(bytes++); in isValidUtf()
|
/packages/apps/UnifiedEmail/src/org/apache/commons/io/input/ |
D | NullInputStream.java | 202 public int read(byte[] bytes) throws IOException { in read() argument 203 return read(bytes, 0, bytes.length); in read() 219 public int read(byte[] bytes, int offset, int length) throws IOException { in read() argument 232 processBytes(bytes, offset, returnLength); in read() 309 protected void processBytes(byte[] bytes, int offset, int length) { in processBytes() argument
|
/packages/apps/Dialer/java/com/android/voicemail/impl/imap/ |
D | VoicemailPayload.java | 22 private final byte[] bytes; field in VoicemailPayload 24 public VoicemailPayload(String mimeType, byte[] bytes) { in VoicemailPayload() argument 26 this.bytes = bytes; in VoicemailPayload() 30 return bytes; in getBytes()
|
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/archives/ |
D | TestUtils.java | 75 int bytes; in getSeekableDescriptor() local 76 while ((bytes = inputStream.read(buffer)) != -1) { in getSeekableDescriptor() 77 outputStream.write(buffer, 0, bytes); in getSeekableDescriptor() 113 int bytes; in getNonSeekableDescriptor() 114 while ((bytes = inputStream.read(buffer)) != -1) { in getNonSeekableDescriptor() 115 outputStream.write(buffer, 0, bytes); in getNonSeekableDescriptor()
|
/packages/apps/Dialer/java/com/android/dialer/protos/ |
D | ProtoParsers.java | 42 byte[] bytes = bundle.getByteArray(key); in get() 43 return (T) mergeFrom(bytes, defaultInstance.getDefaultInstanceForType()); in get() 59 byte[] bytes = contentValues.getAsByteArray(key); in get() 60 return (T) mergeFrom(bytes, defaultInstance.getDefaultInstanceForType()); in get() 129 private static <T extends MessageLite> T mergeFrom(byte[] bytes, T defaultInstance) { in mergeFrom() argument 131 return (T) defaultInstance.toBuilder().mergeFrom(bytes).build(); in mergeFrom()
|
/packages/apps/Nfc/src/com/android/nfc/ndefpush/ |
D | NdefPushProtocol.java | 115 byte[] bytes = new byte[length]; in NdefPushProtocol() 119 lengthRead = input.read(bytes); in NdefPushProtocol() 131 mMessages[i] = new NdefMessage(bytes); in NdefPushProtocol() 157 byte[] bytes = mMessages[i].toByteArray(); in toByteArray() 158 output.writeInt(bytes.length); in toByteArray() 159 output.write(bytes); in toByteArray()
|
/packages/apps/Contacts/src/com/android/contacts/util/ |
D | BitmapUtil.java | 40 public static int getSmallerExtentFromBytes(byte[] bytes) { in getSmallerExtentFromBytes() argument 45 BitmapFactory.decodeByteArray(bytes, 0, bytes.length, options); in getSmallerExtentFromBytes() 81 public static Bitmap decodeBitmapFromBytes(byte[] bytes, int sampleSize) { in decodeBitmapFromBytes() argument 89 return BitmapFactory.decodeByteArray(bytes, 0, bytes.length, options); in decodeBitmapFromBytes()
|
/packages/apps/Nfc/nci/jni/ |
D | NativeLlcpSocket.cpp | 120 ScopedByteArrayRO bytes(e, data); in nativeLlcpSocket_doSend() local 125 &bytes[0])); // TODO: API bug: send should take const*! in nativeLlcpSocket_doSend() 126 bool stat = PeerToPeer::getInstance().send(jniHandle, raw_ptr, bytes.size()); in nativeLlcpSocket_doSend() 148 ScopedByteArrayRW bytes(e, origBuffer); in nativeLlcpSocket_doReceive() local 154 jniHandle, reinterpret_cast<uint8_t*>(&bytes[0]), bytes.size(), in nativeLlcpSocket_doReceive()
|
/packages/apps/StorageManager/src/com/android/storagemanager/deletionhelper/ |
D | PhotosDeletionPreference.java | 51 public void updatePreferenceText(int items, long bytes) { in updatePreferenceText() argument 58 Formatter.formatFileSize(context, bytes), in updatePreferenceText() 68 public void onFreeableChanged(int items, long bytes) { in onFreeableChanged() argument 74 PhotosDeletionPreference.super.onFreeableChanged(items, bytes); in onFreeableChanged() 75 updatePreferenceText(items, bytes); in onFreeableChanged()
|
/packages/apps/Gallery2/jni_jpegstream/src/ |
D | jpeg_reader.cpp | 117 int32_t JpegReader::read(int8_t* bytes, int32_t offset, int32_t count) { in read() argument 135 if (bytes != NULL) { in read() 137 memcpy((void*) (bytes + offset), (void*) mScanlineIter, in read() 145 if (bytes != NULL) { in read() 147 memcpy((void*) (bytes + offset), (void*) mScanlineIter, in read() 149 bytes += mScanlineBytesRemaining; in read()
|