Home
last modified time | relevance | path

Searched refs:pdu (Results 1 – 25 of 83) sorted by relevance

1234

/packages/modules/CellBroadcastService/tests/src/com/android/cellbroadcastservice/tests/
DGsmSmsCbMessageTest.java106 final byte[] pdu = hexStringToBytes("0111130F6A0101C8329BFD06559BD429E8FE96B3C92C101D9D9" in testCreateMessageFromBinary()
121 SmsCbHeader header = new SmsCbHeader(pdu); in testCreateMessageFromBinary()
124 pdus[0] = pdu; in testCreateMessageFromBinary()
170 final byte[] pdu = hexStringToBytes("0001113001010010C0111204D2"); in testCreateTriggerMessage()
172 GsmSmsCbMessage.createGeoFencingTriggerMessage(pdu); in testCreateTriggerMessage()
183 private SmsCbMessage createFromPdu(byte[] pdu) { in createFromPdu() argument
185 SmsCbHeader header = new SmsCbHeader(pdu); in createFromPdu()
187 pdus[0] = pdu; in createFromPdu()
195 private void doTestGeographicalScopeValue(byte[] pdu, byte b, int expectedGs) { in doTestGeographicalScopeValue() argument
196 pdu[0] = b; in doTestGeographicalScopeValue()
[all …]
DGsmCellBroadcastHandlerTest.java189 final byte[] pdu = hexStringToBytes("0001113001010010C0111204D2"); in testTriggerMessage()
190 mGsmCellBroadcastHandler.onGsmCellBroadcastSms(0, pdu); in testTriggerMessage()
223 final byte[] pdu = hexStringToBytes("0001113001010010C0111204D2"); in testAirplaneModeReset()
224 mGsmCellBroadcastHandler.onGsmCellBroadcastSms(0, pdu); in testAirplaneModeReset()
234 final byte[] pdu = hexStringToBytes("01111D7090010254747A0E4ACF416110B538A582DE6650906AA28" in testGeofencingAlertOutOfPolygon()
240 mGsmCellBroadcastHandler.onGsmCellBroadcastSms(0, pdu); in testGeofencingAlertOutOfPolygon()
257 final byte[] pdu = hexStringToBytes("01111B40110101C366701A09368545692408000000000000000" in testSmsCbLocation()
277 mGsmCellBroadcastHandler.onGsmCellBroadcastSms(0, pdu); in testSmsCbLocation()
/packages/apps/Bluetooth/src/com/android/bluetooth/map/
DBluetoothMapSmsPdu.java176 ByteArrayInputStream pdu = new ByteArrayInputStream(mData); in cdmaGetParameterOffset() local
181 pdu.skip(1); // Skip the message type in cdmaGetParameterOffset()
183 while (pdu.available() > 0) { in cdmaGetParameterOffset()
184 int currentId = pdu.read(); in cdmaGetParameterOffset()
185 int currentLen = pdu.read(); in cdmaGetParameterOffset()
191 pdu.skip(currentLen); in cdmaGetParameterOffset()
195 pdu.close(); in cdmaGetParameterOffset()
210 ByteArrayInputStream pdu = new ByteArrayInputStream(mData); in cdmaGetSubParameterOffset() local
215 pdu.skip(offset); in cdmaGetSubParameterOffset()
218 while (pdu.available() > 0) { in cdmaGetSubParameterOffset()
[all …]
DMmsFileProvider.java28 import com.google.android.mms.pdu.GenericPdu;
29 import com.google.android.mms.pdu.PduComposer;
30 import com.google.android.mms.pdu.PduPersister;
116 GenericPdu pdu = null; in writeDataToPipe() local
122 pdu = pduPersister.load(uri); in writeDataToPipe()
123 byte[] bytes = (new PduComposer(getContext(), pdu)).make(); in writeDataToPipe()
DBluetoothMapbMessageSms.java109 for (SmsPdu pdu : mSmsBodyPdus) { in encode()
112 encodeBinary(pdu.getData(), pdu.getScAddress()).getBytes("UTF-8")); in encode()
/packages/apps/CellBroadcastReceiver/tests/testapp/src/com/android/cellbroadcastreceiver/tests/
DGsmSmsCbMessage.java118 byte[] pdu = pdus[0]; in createSmsCbMessage()
119 Pair<String, String> cbData = parseUmtsBody(header, pdu); in createSmsCbMessage()
124 int nrPages = pdu[SmsCbHeader.PDU_HEADER_LENGTH]; in createSmsCbMessage()
132 if (pdu.length > wacDataOffset) { in createSmsCbMessage()
134 Pair<Integer, List<Geometry>> wac = parseWarningAreaCoordinates(pdu, in createSmsCbMessage()
153 for (byte[] pdu : pdus) { in createSmsCbMessage()
154 Pair<String, String> p = parseGsmBody(header, pdu); in createSmsCbMessage()
179 byte[] pdu, int wacOffset) { in parseWarningAreaCoordinates() argument
181 int wacDataLength = ((pdu[wacOffset + 1] & 0xff) << 8) | (pdu[wacOffset] & 0xff); in parseWarningAreaCoordinates()
184 if (offset + wacDataLength > pdu.length) { in parseWarningAreaCoordinates()
[all …]
DSendTestMessages.java390 private static SmsCbMessage createFromPdu(Context context, byte[] pdu, int serialNumber, in createFromPdu() argument
393 pdus[0] = pdu; in createFromPdu()
400 for (byte[] pdu : pdus) { in createFromPdus()
401 if (pdu.length <= 88) { in createFromPdus()
404 pdu[0] = (byte) ((serialNumber >>> 8) & 0xff); in createFromPdus()
405 pdu[1] = (byte) (serialNumber & 0xff); in createFromPdus()
408 pdu[2] = (byte) ((category >>> 8) & 0xff); in createFromPdus()
409 pdu[3] = (byte) (category & 0xff); in createFromPdus()
414 pdu[3] = (byte) ((serialNumber >>> 8) & 0xff); in createFromPdus()
415 pdu[4] = (byte) (serialNumber & 0xff); in createFromPdus()
[all …]
/packages/modules/CellBroadcastService/src/com/android/cellbroadcastservice/
DSmsCbHeader.java132 public SmsCbHeader(byte[] pdu) throws IllegalArgumentException { in SmsCbHeader() argument
133 if (pdu == null || pdu.length < PDU_HEADER_LENGTH) { in SmsCbHeader()
141 if (pdu.length <= PDU_LENGTH_GSM) { in SmsCbHeader()
146 mGeographicalScope = (pdu[0] & 0xc0) >>> 6; in SmsCbHeader()
147 mSerialNumber = ((pdu[0] & 0xff) << 8) | (pdu[1] & 0xff); in SmsCbHeader()
148 mMessageIdentifier = ((pdu[2] & 0xff) << 8) | (pdu[3] & 0xff); in SmsCbHeader()
149 if (isEtwsMessage() && pdu.length <= PDU_LENGTH_ETWS) { in SmsCbHeader()
154 boolean emergencyUserAlert = (pdu[4] & 0x1) != 0; in SmsCbHeader()
155 boolean activatePopup = (pdu[5] & 0x80) != 0; in SmsCbHeader()
156 int warningType = (pdu[4] & 0xfe) >>> 1; in SmsCbHeader()
[all …]
DGsmSmsCbMessage.java122 byte[] pdu = pdus[0]; in createSmsCbMessage()
123 Pair<String, String> cbData = parseUmtsBody(header, pdu); in createSmsCbMessage()
128 int nrPages = pdu[SmsCbHeader.PDU_HEADER_LENGTH]; in createSmsCbMessage()
136 if (pdu.length > wacDataOffset) { in createSmsCbMessage()
138 Pair<Integer, List<Geometry>> wac = parseWarningAreaCoordinates(pdu, in createSmsCbMessage()
157 for (byte[] pdu : pdus) { in createSmsCbMessage()
158 Pair<String, String> p = parseGsmBody(header, pdu); in createSmsCbMessage()
189 public static GeoFencingTriggerMessage createGeoFencingTriggerMessage(byte[] pdu) { in createGeoFencingTriggerMessage() argument
195 BitStreamReader bitReader = new BitStreamReader(pdu, whamOffset); in createGeoFencingTriggerMessage()
231 byte[] pdu, int wacOffset) { in parseWarningAreaCoordinates() argument
[all …]
DGsmAlphabet.java636 public static String gsm7BitPackedToString(byte[] pdu, int offset, in gsm7BitPackedToString() argument
638 return gsm7BitPackedToString(pdu, offset, lengthSeptets, 0, 0, 0); in gsm7BitPackedToString()
657 public static String gsm7BitPackedToString(byte[] pdu, int offset, in gsm7BitPackedToString() argument
691 gsmVal = (0x7f & (pdu[offset + byteOffset] >> shift)); in gsm7BitPackedToString()
698 gsmVal |= 0x7f & (pdu[offset + byteOffset + 1] << (8 - shift)); in gsm7BitPackedToString()
DGsmCellBroadcastHandler.java292 byte[] pdu = (byte[]) message.obj; in handleSmsMessage()
293 SmsCbHeader header = createSmsCbHeader(pdu); in handleSmsMessage()
299 GsmSmsCbMessage.createGeoFencingTriggerMessage(pdu); in handleSmsMessage()
304 SmsCbMessage cbMessage = handleGsmBroadcastSms(header, pdu, slotIndex); in handleSmsMessage()
489 for (byte[] pdu : pdus) { in handleGsmBroadcastSms()
490 if (pdu == null) { in handleGsmBroadcastSms()
/packages/services/Mms/src/com/android/mms/service/
DSendRequest.java40 import com.google.android.mms.pdu.EncodedStringValue;
41 import com.google.android.mms.pdu.GenericPdu;
42 import com.google.android.mms.pdu.PduComposer;
43 import com.google.android.mms.pdu.PduHeaders;
44 import com.google.android.mms.pdu.PduParser;
45 import com.google.android.mms.pdu.PduPersister;
46 import com.google.android.mms.pdu.SendConf;
47 import com.google.android.mms.pdu.SendReq;
185 GenericPdu pdu = (new PduParser(mPduData, supportContentDisposition)).parse(); in persistIfRequired() local
186 if (pdu == null) { in persistIfRequired()
[all …]
DMmsService.java19 import static com.google.android.mms.pdu.PduHeaders.MESSAGE_TYPE;
20 import static com.google.android.mms.pdu.PduHeaders.MESSAGE_TYPE_SEND_REQ;
54 import com.google.android.mms.pdu.DeliveryInd;
55 import com.google.android.mms.pdu.GenericPdu;
56 import com.google.android.mms.pdu.NotificationInd;
57 import com.google.android.mms.pdu.PduParser;
58 import com.google.android.mms.pdu.PduPersister;
59 import com.google.android.mms.pdu.ReadOrigInd;
60 import com.google.android.mms.pdu.RetrieveConf;
61 import com.google.android.mms.pdu.SendReq;
[all …]
DDownloadRequest.java42 import com.google.android.mms.pdu.GenericPdu;
43 import com.google.android.mms.pdu.PduHeaders;
44 import com.google.android.mms.pdu.PduParser;
45 import com.google.android.mms.pdu.PduPersister;
46 import com.google.android.mms.pdu.RetrieveConf;
119 final GenericPdu pdu = (new PduParser(response, supportMmsContentDisposition)).parse(); in persistIfRequired() local
120 if (pdu == null || !(pdu instanceof RetrieveConf)) { in persistIfRequired()
125 final RetrieveConf retrieveConf = (RetrieveConf) pdu; in persistIfRequired()
148 pdu, in persistIfRequired()
DMmsHttpClient.java119 public byte[] execute(String urlString, byte[] pdu, String method, boolean isProxySet, in execute() argument
124 + ", PDU size=" + (pdu != null ? pdu.length : 0)); in execute()
179 if (pdu == null || pdu.length < 1) { in execute()
195 connection.setFixedLengthStreamingMode(pdu.length); in execute()
199 out.write(pdu); in execute()
/packages/apps/Messaging/src/com/android/messaging/sms/
DMmsSender.java32 import com.android.messaging.mmslib.pdu.AcknowledgeInd;
33 import com.android.messaging.mmslib.pdu.EncodedStringValue;
34 import com.android.messaging.mmslib.pdu.GenericPdu;
35 import com.android.messaging.mmslib.pdu.NotifyRespInd;
36 import com.android.messaging.mmslib.pdu.PduComposer;
37 import com.android.messaging.mmslib.pdu.PduHeaders;
38 import com.android.messaging.mmslib.pdu.PduParser;
39 import com.android.messaging.mmslib.pdu.RetrieveConf;
40 import com.android.messaging.mmslib.pdu.SendConf;
41 import com.android.messaging.mmslib.pdu.SendReq;
[all …]
DMmsUtils.java56 import com.android.messaging.mmslib.pdu.CharacterSets;
57 import com.android.messaging.mmslib.pdu.EncodedStringValue;
58 import com.android.messaging.mmslib.pdu.GenericPdu;
59 import com.android.messaging.mmslib.pdu.NotificationInd;
60 import com.android.messaging.mmslib.pdu.PduBody;
61 import com.android.messaging.mmslib.pdu.PduComposer;
62 import com.android.messaging.mmslib.pdu.PduHeaders;
63 import com.android.messaging.mmslib.pdu.PduParser;
64 import com.android.messaging.mmslib.pdu.PduPart;
65 import com.android.messaging.mmslib.pdu.PduPersister;
[all …]
/packages/apps/Messaging/src/android/support/v7/mms/
DMmsRequest.java28 import androidx.appcompat.mms.pdu.GenericPdu;
29 import androidx.appcompat.mms.pdu.PduHeaders;
30 import androidx.appcompat.mms.pdu.PduParser;
31 import androidx.appcompat.mms.pdu.SendConf;
226 final GenericPdu pdu = new PduParser( in isWrongApnResponse() local
234 if (pdu != null && pdu instanceof SendConf) { in isWrongApnResponse()
235 final SendConf sendConf = (SendConf) pdu; in isWrongApnResponse()
DMmsHttpClient.java112 public byte[] execute(String urlString, byte[] pdu, String method, boolean isProxySet, in execute() argument
117 + ", PDU size=" + (pdu != null ? pdu.length : 0)); in execute()
153 if (pdu == null || pdu.length < 1) { in execute()
171 connection.setFixedLengthStreamingMode(pdu.length); in execute()
175 out.write(pdu); in execute()
DDownloadRequest.java80 final byte[] pdu) { in writePduToContentUri() argument
81 if (contentUri == null || pdu == null) { in writePduToContentUri()
91 outStream.write(pdu); in writePduToContentUri()
/packages/apps/Messaging/src/com/android/messaging/util/
DDebugUtils.java265 final byte[] pdu = message.getPdu();
266 dos.writeInt(pdu.length);
267 dos.write(pdu, 0, pdu.length);
303 final byte[] pdu = new byte[length];
304 dis.read(pdu, 0, length);
306 messagesTemp[i] = SmsMessage.createFromPdu(pdu);
308 messagesTemp[i] = SmsMessage.createFromPdu(pdu, format);
/packages/apps/Messaging/src/com/android/messaging/mmslib/util/
DPduCacheEntry.java20 import com.android.messaging.mmslib.pdu.GenericPdu;
27 public PduCacheEntry(GenericPdu pdu, int msgBox, long threadId) { in PduCacheEntry() argument
28 mPdu = pdu; in PduCacheEntry()
/packages/apps/Messaging/src/com/android/messaging/mmslib/pdu/
DPduPersister.java18 package com.android.messaging.mmslib.pdu;
563 GenericPdu pdu = null; in load() local
620 pdu = createPdu(msgType, headers, body); in load()
623 if (pdu != null) { in load()
626 cacheEntry = new PduCacheEntry(pdu, msgBox, threadId); in load()
633 return pdu; in load()
1304 public Uri persist(final GenericPdu pdu, final Uri uri, final int subId, in persist() argument
1342 final PduHeaders header = pdu.getPduHeaders(); in persist()
1403 final int msgType = pdu.getMessageType(); in persist()
1449 if (pdu instanceof MultimediaMessagePdu) { in persist()
[all …]
DPduComposer.java18 package com.android.messaging.mmslib.pdu;
137 public PduComposer(final Context context, final GenericPdu pdu) { in PduComposer() argument
138 mPdu = pdu; in PduComposer()
140 mPduHeader = pdu.getPduHeaders(); in PduComposer()
/packages/apps/Bluetooth/src/com/android/bluetooth/util/
DGsmAlphabet.java142 public static String gsm7BitPackedToString(byte[] pdu, int offset, int lengthSeptets, in gsm7BitPackedToString() argument
177 gsmVal = (0x7f & (pdu[offset + byteOffset] >> shift)); in gsm7BitPackedToString()
184 gsmVal |= 0x7f & (pdu[offset + byteOffset + 1] << (8 - shift)); in gsm7BitPackedToString()

1234