/packages/modules/NetworkStack/src/com/android/networkstack/netlink/ |
D | TcpSocketTracker.java | 214 final ByteBuffer bytes = mDependencies.recvMessage(fd); in pollSocketsInfo() local 216 while (enoughBytesRemainForValidNlMsg(bytes)) { in pollSocketsInfo() 217 final StructNlMsgHdr nlmsghdr = StructNlMsgHdr.parse(bytes); in pollSocketsInfo() 223 log("pollSocketsInfo: nlmsghdr=" + nlmsghdr + ", limit=" + bytes.limit()); in pollSocketsInfo() 238 bytes.position(bytes.position() + IDIAG_COOKIE_OFFSET); in pollSocketsInfo() 240 final long cookie = bytes.getLong(); in pollSocketsInfo() 242 bytes.position(bytes.position() in pollSocketsInfo() 245 final SocketInfo info = parseSockInfo(bytes, family, nlmsgLen, time); in pollSocketsInfo() 254 + " buffer:" + bytes + " " in pollSocketsInfo() 255 + Base64.getEncoder().encodeToString(bytes.array()), e); in pollSocketsInfo() [all …]
|
D | TcpInfo.java | 114 private TcpInfo(@NonNull ByteBuffer bytes, int infolen) { in TcpInfo() argument 120 final int start = bytes.position(); in TcpInfo() 121 mSegsIn = bytes.getInt(start + SEGS_IN_OFFSET); in TcpInfo() 122 mSegsOut = bytes.getInt(start + SEGS_OUT_OFFSET); in TcpInfo() 123 mLost = bytes.getInt(start + LOST_OFFSET); in TcpInfo() 124 mRetransmits = bytes.get(start + RETRANSMITS_OFFSET); in TcpInfo() 128 bytes.position(Math.min(infolen + start, bytes.limit())); in TcpInfo() 141 public static TcpInfo parse(@NonNull ByteBuffer bytes, int infolen) { in parse() argument 143 return new TcpInfo(bytes, infolen); in parse()
|
/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 | 177 return value.bytes != null ? value.bytes.length : 0; in ContactPhotoManagerImpl() 208 private static String btk(int bytes) { in btk() argument 209 return ((bytes + 1023) / 1024) + "K"; in btk() 231 byte[] bytes = holder.bytes; in inflateBitmap() 232 if (bytes == null || bytes.length == 0) { in inflateBitmap() 248 Bitmap bitmap = BitmapUtil.decodeBitmapFromBytes(bytes, sampleSize); in inflateBitmap() 287 + btk(bytes.length) in inflateBitmap() 312 if (h.bytes != null) { in dumpStats() 313 rawBytes += h.bytes.length; in dumpStats() 531 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 | 55 public static void deserializeInternalProviderData(byte[] bytes, ProgramImpl.Builder builder) { in deserializeInternalProviderData() argument 56 if (bytes == null || bytes.length == 0) { in deserializeInternalProviderData() 59 try (ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(bytes))) { in deserializeInternalProviderData() 105 byte[] bytes, RecordedProgram.Builder builder) { in deserializeInternalProviderData() argument 106 if (bytes == null || bytes.length == 0) { in deserializeInternalProviderData() 109 try (ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(bytes))) { in deserializeInternalProviderData()
|
/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 | 116 byte[] bytes = byteMap.get(key); in CredentialHelper() 117 Log.d(TAG, " " + key + ": " + ((bytes == null) ? -1 : bytes.length)); in CredentialHelper() 118 mBundle.put(key, bytes); in CredentialHelper() 168 private void parseCert(byte[] bytes) { in parseCert() argument 169 if (bytes == null) { in parseCert() 177 new ByteArrayInputStream(bytes)); in parseCert() 236 void setPrivateKey(String algorithm, byte[] bytes) { in setPrivateKey() argument 239 mUserKey = keyFactory.generatePrivate(new PKCS8EncodedKeySpec(bytes)); in setPrivateKey() 337 byte[] bytes = null; in installVpnAndAppsTrustAnchors() 339 bytes = caCert.getEncoded(); in installVpnAndAppsTrustAnchors() [all …]
|
/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 | 56 bool isValidUtf(const char* bytes) const { in isValidUtf() argument 57 while (*bytes != '\0') { in isValidUtf() 58 const uint8_t* utf8 = reinterpret_cast<const uint8_t*>(bytes++); in isValidUtf() 83 utf8 = reinterpret_cast<const uint8_t*>(bytes++); in isValidUtf() 95 utf8 = reinterpret_cast<const uint8_t*>(bytes++); in isValidUtf() 104 utf8 = reinterpret_cast<const uint8_t*>(bytes++); in isValidUtf()
|
/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/modules/NetworkStack/common/netlinkclient/src/android/net/netlink/ |
D | RtNetlinkNeighborMessage.java | 118 final byte[] bytes = new byte[length]; in newGetNeighborsRequest() 119 final ByteBuffer byteBuffer = ByteBuffer.wrap(bytes); in newGetNeighborsRequest() 132 return bytes; in newGetNeighborsRequest() 155 final byte[] bytes = new byte[msg.getRequiredSpace()]; in newNewNeighborMessage() 156 nlmsghdr.nlmsg_len = bytes.length; in newNewNeighborMessage() 157 final ByteBuffer byteBuffer = ByteBuffer.wrap(bytes); in newNewNeighborMessage() 160 return bytes; in newNewNeighborMessage()
|
D | NetlinkSocket.java | 66 final ByteBuffer bytes = recvMessage(fd, DEFAULT_RECV_BUFSIZE, IO_TIMEOUT); in sendOneShotKernelMessage() local 68 final NetlinkMessage response = NetlinkMessage.parse(bytes); in sendOneShotKernelMessage() 83 bytes.position(0); in sendOneShotKernelMessage() 84 errmsg = "raw bytes: " + NetlinkConstants.hexify(bytes); in sendOneShotKernelMessage() 152 FileDescriptor fd, byte[] bytes, int offset, int count, long timeoutMs) in sendMessage() argument 156 return Os.write(fd, bytes, offset, count); in sendMessage()
|
/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()
|