/packages/apps/Email/emailcommon/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/Browser/tests/src/com/android/browser/ |
D | WebStorageSizeManagerUnitTests.java | 77 private long bytes(double megabytes) { in bytes() method in WebStorageSizeManagerUnitTests 88 mDiskInfo.setTotalSizeBytes(bytes(75)); in testCallbacks() 89 mDiskInfo.setFreeSpaceSizeBytes(bytes(24)); in testCallbacks() 97 long origin1EstimatedSize = bytes(3.5); in testCallbacks() 105 long origin2EstimatedSize = bytes(2.5); in testCallbacks() 128 long origin3EstimatedSize = bytes(5); in testCallbacks() 146 manager.onExceededDatabaseQuota("4", "4", 0, bytes(1), totalUsedQuota, mQuotaUpdater); in testCallbacks() 150 mAppCacheInfo.setAppCacheSizeBytes(bytes(2)); in testCallbacks() 152 manager.onReachedMaxAppCacheSize(bytes(2), totalUsedQuota, mQuotaUpdater); in testCallbacks() 160 manager.onReachedMaxAppCacheSize(bytes(1.5), totalUsedQuota, mQuotaUpdater); in testCallbacks() [all …]
|
/packages/apps/Gallery2/gallerycommon/src/com/android/gallery3d/common/ |
D | Fingerprint.java | 71 public Fingerprint(byte[] bytes) { in Fingerprint() argument 72 if ((bytes == null) || (bytes.length != FINGERPRINT_BYTE_LENGTH)) { in Fingerprint() 75 mMd5Digest = bytes; in Fingerprint() 91 byte[] bytes = new byte[8192]; in fromInputStream() 94 int n = in.read(bytes); in fromInputStream() 116 byte[] bytes = new byte[FINGERPRINT_BYTE_LENGTH]; in fromStreamId() 121 bytes[byteIdx++] = (byte) (value & 0xff); in fromStreamId() 123 return new Fingerprint(bytes); in fromStreamId() 184 private static void appendHexFingerprint(StringBuilder sb, byte[] bytes) { in appendHexFingerprint() argument 186 int value = bytes[idx]; in appendHexFingerprint()
|
/packages/apps/Nfc/src/com/android/nfc/snep/ |
D | SnepMessage.java | 97 byte[] bytes = new byte[ndefLength]; in SnepMessage() 98 System.arraycopy(data, ndefOffset, bytes, 0, ndefLength); in SnepMessage() 99 mNdefMessage = new NdefMessage(bytes); in SnepMessage() 115 byte[] bytes; in toByteArray() 117 bytes = mNdefMessage.toByteArray(); in toByteArray() 119 bytes = new byte[0]; in toByteArray() 125 buffer = new ByteArrayOutputStream(bytes.length + HEADER_LENGTH + 4); in toByteArray() 127 buffer = new ByteArrayOutputStream(bytes.length + HEADER_LENGTH); in toByteArray() 134 output.writeInt(bytes.length + 4); in toByteArray() 137 output.writeInt(bytes.length); in toByteArray() [all …]
|
/packages/apps/CertInstaller/src/com/android/certinstaller/ |
D | Util.java | 45 static <T> T fromBytes(byte[] bytes) { in fromBytes() argument 46 if (bytes == null) return null; in fromBytes() 49 new ObjectInputStream(new ByteArrayInputStream(bytes)); in fromBytes() 57 static String toMd5(byte[] bytes) { in toMd5() argument 61 algorithm.update(bytes); in toMd5() 70 private static String toHexString(byte[] bytes, String separator) { in toHexString() argument 72 for (byte b : bytes) { in toHexString()
|
D | CredentialHelper.java | 88 byte[] bytes = bundle.getByteArray(key); in CredentialHelper() 89 Log.d(TAG, " " + key + ": " + ((bytes == null) ? -1 : bytes.length)); in CredentialHelper() 90 mBundle.put(key, bytes); in CredentialHelper() 119 byte[] bytes = savedStates.getByteArray(Credentials.USER_PRIVATE_KEY); in onRestoreStates() 120 if (bytes != null) { in onRestoreStates() 121 setPrivateKey(bytes); in onRestoreStates() 134 private void parseCert(byte[] bytes) { in parseCert() argument 135 if (bytes == null) { in parseCert() 143 new ByteArrayInputStream(bytes)); in parseCert() 195 void setPrivateKey(byte[] bytes) { in setPrivateKey() argument [all …]
|
/packages/apps/Settings/src/com/android/settings/fuelgauge/ |
D | Utils.java | 74 public static String formatBytes(Context context, double bytes) { in formatBytes() argument 76 if (bytes > 1000 * 1000) { in formatBytes() 77 return String.format("%.2f MB", ((int) (bytes / 1000)) / 1000f); in formatBytes() 78 } else if (bytes > 1024) { in formatBytes() 79 return String.format("%.2f KB", ((int) (bytes / 10)) / 100f); in formatBytes() 81 return String.format("%d bytes", (int) bytes); in formatBytes()
|
/packages/apps/Email/emailcommon/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/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/Gallery2/src/com/android/gallery3d/data/ |
D | DecodeUtils.java | 66 public static Bitmap requestDecode(JobContext jc, byte[] bytes, in requestDecode() argument 68 return requestDecode(jc, bytes, 0, bytes.length, options); in requestDecode() 71 public static Bitmap requestDecode(JobContext jc, byte[] bytes, int offset, in requestDecode() argument 76 BitmapFactory.decodeByteArray(bytes, offset, length, options)); in requestDecode() 158 JobContext jc, byte[] bytes, int offset, int length, in requestCreateBitmapRegionDecoder() argument 160 if (offset < 0 || length <= 0 || offset + length > bytes.length) { in requestCreateBitmapRegionDecoder() 163 offset, length, bytes.length)); in requestCreateBitmapRegionDecoder() 168 bytes, offset, length, shareable); in requestCreateBitmapRegionDecoder()
|
D | SizeClustering.java | 112 long bytes = SIZE_LEVELS[index]; in getSizeString() local 113 if (bytes >= GIGA_BYTES) { in getSizeString() 114 return (bytes / GIGA_BYTES) + "GB"; in getSizeString() 116 return (bytes / MEGA_BYTES) + "MB"; in getSizeString()
|
D | MtpImage.java | 96 byte[] bytes = mMtpContext.getMtpClient().getObject( 99 jc, bytes, 0, bytes.length, false);
|
/packages/apps/Camera/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/Contacts/src/com/android/contacts/ |
D | ContactPhotoManager.java | 205 final byte[] bytes; field in ContactPhotoManagerImpl.BitmapHolder 211 public BitmapHolder(byte[] bytes) { in BitmapHolder() argument 212 this.bytes = bytes; in BitmapHolder() 275 return value.bytes != null ? value.bytes.length : 0; in ContactPhotoManagerImpl() 352 if (holder.bytes == null) { in loadCachedPhoto() 379 byte[] bytes = holder.bytes; in inflateBitmap() 380 if (bytes == null || bytes.length == 0) { in inflateBitmap() 394 Bitmap bitmap = BitmapFactory.decodeByteArray(bytes, 0, bytes.length, null); in inflateBitmap() 500 private void cacheBitmap(Object key, byte[] bytes, boolean preloading) { in cacheBitmap() argument 501 BitmapHolder holder = new BitmapHolder(bytes); in cacheBitmap() [all …]
|
/packages/apps/Exchange/src/com/android/exchange/utility/ |
D | CalendarUtilities.java | 181 static int getLong(byte[] bytes, int offset) { in getLong() argument 182 return (bytes[offset++] & 0xFF) | ((bytes[offset++] & 0xFF) << 8) | in getLong() 183 ((bytes[offset++] & 0xFF) << 16) | ((bytes[offset] & 0xFF) << 24); in getLong() 187 static void setLong(byte[] bytes, int offset, int value) { in setLong() argument 188 bytes[offset++] = (byte) (value & 0xFF); in setLong() 189 bytes[offset++] = (byte) ((value >> 8) & 0xFF); in setLong() 190 bytes[offset++] = (byte) ((value >> 16) & 0xFF); in setLong() 191 bytes[offset] = (byte) ((value >> 24) & 0xFF); in setLong() 195 static int getWord(byte[] bytes, int offset) { in getWord() argument 196 return (bytes[offset++] & 0xFF) | ((bytes[offset] & 0xFF) << 8); in getWord() [all …]
|
/packages/apps/Exchange/tests/src/com/android/exchange/utility/ |
D | SimpleIcsWriterTests.java | 83 final byte[] bytes = ics.getBytes(); in checkWriteLine() 87 for (byte b : bytes) { in checkWriteLine() 102 final String actual = Utility.fromUtf8(bytes); in checkWriteLine()
|
/packages/apps/Email/emailcommon/src/com/android/emailcommon/internet/ |
D | TextBody.java | 38 byte[] bytes = mBody.getBytes("UTF-8"); in writeTo() 39 out.write(Base64.encode(bytes, Base64.CRLF)); in writeTo()
|
/packages/apps/Email/emailcommon/src/org/apache/james/mime4j/decoder/ |
D | DecoderUtil.java | 52 byte[] bytes = s.getBytes("US-ASCII"); in decodeBaseQuotedPrintable() 55 new ByteArrayInputStream(bytes)); in decodeBaseQuotedPrintable() 81 byte[] bytes = s.getBytes("US-ASCII"); in decodeBase64() 84 new ByteArrayInputStream(bytes)); in decodeBase64()
|
/packages/apps/KeyChain/src/com/android/keychain/ |
D | KeyChainService.java | 104 byte[] bytes = mKeyStore.get(key); 105 if (bytes == null) { 108 return bytes; 128 private X509Certificate parseCertificate(byte[] bytes) throws CertificateException { 130 return (X509Certificate) cf.generateCertificate(new ByteArrayInputStream(bytes));
|
/packages/experimental/AndroidVendorSecurityTool/src/com/android/vending/sectool/v1/ |
D | BackendTest.java | 111 byte[] bytes = new byte[8192]; in getChecksum() 114 while ((byteCount = in.read(bytes)) > 0) { in getChecksum() 115 crc.update(bytes, 0, byteCount); in getChecksum()
|
/packages/apps/Mms/src/com/android/mms/util/ |
D | AddressUtils.java | 56 byte[] bytes = PduPersister.getBytes(from); in getFrom() 58 return new EncodedStringValue(charset, bytes) in getFrom()
|
/packages/apps/Camera/src/com/android/camera/ |
D | Exif.java | 121 private static int pack(byte[] bytes, int offset, int length, in pack() argument 131 value = (value << 8) | (bytes[offset] & 0xFF); in pack()
|
/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/util/ |
D | JavaNetHttpHelper.java | 162 int bytes; in getResponseFrom() local 163 while ((bytes = reader.read(chars)) != -1) { in getResponseFrom() 164 string.append(chars, 0, bytes); in getResponseFrom()
|
/packages/apps/Exchange/tests/src/com/android/exchange/adapter/ |
D | SerializerTests.java | 56 byte[] bytes = s.toByteArray(); in testSerializer() 92 MoreAsserts.assertEquals("Serializer mismatch", bytes, expectedBytes); in testSerializer()
|
/packages/apps/Email/emailcommon/src/com/android/emailcommon/utility/ |
D | Utility.java | 250 byte[] bytes = s.getBytes("UTF-8"); in fastUrlDecode() 253 for (int i = 0, count = bytes.length; i < count; i++) { in fastUrlDecode() 254 ch = bytes[i]; in fastUrlDecode() 256 int h = (bytes[i + 1] - '0'); in fastUrlDecode() 257 int l = (bytes[i + 2] - '0'); in fastUrlDecode() 264 bytes[length] = (byte) ((h << 4) | l); in fastUrlDecode() 268 bytes[length] = ' '; in fastUrlDecode() 271 bytes[length] = bytes[i]; in fastUrlDecode() 275 return new String(bytes, 0, length, "UTF-8"); in fastUrlDecode() 386 final byte[] bytes = new byte[buffer.limit()]; in encode() [all …]
|