Home
last modified time | relevance | path

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

123

/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/gsm/
DGsmSmsCbTest.java41 private static SmsCbMessage createFromPdu(byte[] pdu) { in createFromPdu() argument
43 SmsCbHeader header = new SmsCbHeader(pdu); in createFromPdu()
45 pdus[0] = pdu; in createFromPdu()
52 private static void doTestGeographicalScopeValue(byte[] pdu, byte b, int expectedGs) { in doTestGeographicalScopeValue() argument
53 pdu[0] = b; in doTestGeographicalScopeValue()
54 SmsCbMessage msg = createFromPdu(pdu); in doTestGeographicalScopeValue()
68 byte[] pdu = new byte[4]; in testCreateTooShortPdu()
69 SmsCbMessage msg = createFromPdu(pdu); in testCreateTooShortPdu()
76 byte[] pdu = { in testGetGeographicalScope()
92 doTestGeographicalScopeValue(pdu, (byte)0x00, in testGetGeographicalScope()
[all …]
/frameworks/opt/telephony/src/java/com/android/internal/telephony/gsm/
DSmsCbHeader.java93 public SmsCbHeader(byte[] pdu) throws IllegalArgumentException { in SmsCbHeader() argument
94 if (pdu == null || pdu.length < PDU_HEADER_LENGTH) { in SmsCbHeader()
98 if (pdu.length <= PDU_LENGTH_GSM) { in SmsCbHeader()
103 mGeographicalScope = (pdu[0] & 0xc0) >>> 6; in SmsCbHeader()
104 mSerialNumber = ((pdu[0] & 0xff) << 8) | (pdu[1] & 0xff); in SmsCbHeader()
105 mMessageIdentifier = ((pdu[2] & 0xff) << 8) | (pdu[3] & 0xff); in SmsCbHeader()
106 if (isEtwsMessage() && pdu.length <= PDU_LENGTH_ETWS) { in SmsCbHeader()
111 boolean emergencyUserAlert = (pdu[4] & 0x1) != 0; in SmsCbHeader()
112 boolean activatePopup = (pdu[5] & 0x80) != 0; in SmsCbHeader()
113 int warningType = (pdu[4] & 0xfe) >>> 1; in SmsCbHeader()
[all …]
DGsmSmsCbMessage.java78 for (byte[] pdu : pdus) { in createSmsCbMessage()
79 Pair<String, String> p = parseBody(header, pdu); in createSmsCbMessage()
115 private static Pair<String, String> parseBody(SmsCbHeader header, byte[] pdu) { in parseBody() argument
191 int nrPages = pdu[SmsCbHeader.PDU_HEADER_LENGTH]; in parseBody()
193 if (pdu.length < SmsCbHeader.PDU_HEADER_LENGTH + 1 + (PDU_BODY_PAGE_LENGTH + 1) in parseBody()
195 throw new IllegalArgumentException("Pdu length " + pdu.length + " does not match " in parseBody()
205 int length = pdu[offset + PDU_BODY_PAGE_LENGTH]; in parseBody()
212 Pair<String, String> p = unpackBody(pdu, encoding, offset, length, in parseBody()
221 int length = pdu.length - offset; in parseBody()
223 return unpackBody(pdu, encoding, offset, length, hasLanguageIndicator, language); in parseBody()
[all …]
DGsmSMSDispatcher.java155 SmsMessage.SubmitPdu pdu = SmsMessage.getSubmitPdu( in sendData() local
157 if (pdu != null) { in sendData()
158 HashMap map = getSmsTrackerMap(destAddr, scAddr, destPort, data, pdu); in sendData()
183 SmsMessage.SubmitPdu pdu = SmsMessage.getSubmitPdu( in sendText() local
185 if (pdu != null) { in sendText()
186 HashMap map = getSmsTrackerMap(destAddr, scAddr, text, pdu); in sendText()
207 protected void injectSmsPdu(byte[] pdu, String format, PendingIntent receivedIntent) { in injectSmsPdu() argument
225 SmsMessage.SubmitPdu pdu = SmsMessage.getSubmitPdu(scAddress, destinationAddress, in getNewSubmitPduTracker() local
228 if (pdu != null) { in getNewSubmitPduTracker()
230 message, pdu); in getNewSubmitPduTracker()
[all …]
DSmsMessage.java98 public static SmsMessage createFromPdu(byte[] pdu) { in createFromPdu() argument
101 msg.parsePdu(pdu); in createFromPdu()
183 byte[] pdu = new byte[size]; in createFromEfRecord()
184 System.arraycopy(data, 1, pdu, 0, size); in createFromEfRecord()
185 msg.parsePdu(pdu); in createFromEfRecord()
197 public static int getTPLayerLengthForPDU(String pdu) { in getTPLayerLengthForPDU() argument
198 int len = pdu.length() / 2; in getTPLayerLengthForPDU()
199 int smscLen = Integer.parseInt(pdu.substring(0, 2), 16); in getTPLayerLengthForPDU()
505 PduParser(byte[] pdu) { in PduParser() argument
506 mPdu = pdu; in PduParser()
[all …]
DUsimDataDownloadHandler.java116 byte[] pdu = smsMessage.getPdu(); // includes SC address in handleDataDownload()
118 int scAddressLength = pdu[0] & 0xff; in handleDataDownload()
120 int tpduLength = pdu.length - tpduIndex; in handleDataDownload()
148 System.arraycopy(pdu, 1, envelope, index, scAddressLength); in handleDataDownload()
158 System.arraycopy(pdu, tpduIndex, envelope, index, tpduLength); in handleDataDownload()
/frameworks/opt/telephony/src/java/com/android/internal/telephony/
DWapPushOverSms.java19 import static com.google.android.mms.pdu.PduHeaders.MESSAGE_TYPE_DELIVERY_IND;
20 import static com.google.android.mms.pdu.PduHeaders.MESSAGE_TYPE_NOTIFICATION_IND;
21 import static com.google.android.mms.pdu.PduHeaders.MESSAGE_TYPE_READ_ORIG_IND;
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.PduHeaders;
58 import com.google.android.mms.pdu.PduParser;
59 import com.google.android.mms.pdu.PduPersister;
60 import com.google.android.mms.pdu.ReadOrigInd;
[all …]
DTelephonyComponentFactory.java87 public WspTypeDecoder makeWspTypeDecoder(byte[] pdu) { in makeWspTypeDecoder() argument
88 return new WspTypeDecoder(pdu); in makeWspTypeDecoder()
94 public InboundSmsTracker makeInboundSmsTracker(byte[] pdu, long timestamp, int destPort, in makeInboundSmsTracker() argument
96 return new InboundSmsTracker(pdu, timestamp, destPort, is3gpp2, is3gpp2WapPdu, address, in makeInboundSmsTracker()
103 public InboundSmsTracker makeInboundSmsTracker(byte[] pdu, long timestamp, int destPort, in makeInboundSmsTracker() argument
106 return new InboundSmsTracker(pdu, timestamp, destPort, is3gpp2, address, referenceNumber, in makeInboundSmsTracker()
DImsSMSDispatcher.java212 protected void injectSmsPdu(byte[] pdu, String format, PendingIntent receivedIntent) { in injectSmsPdu() argument
218 android.telephony.SmsMessage.createFromPdu(pdu, format); in injectSmsPdu()
292 SmsMessageBase.SubmitPduBase pdu = null; in sendRetrySms() local
300 pdu = com.android.internal.telephony.cdma.SmsMessage.getSubmitPdu( in sendRetrySms()
304 pdu = com.android.internal.telephony.gsm.SmsMessage.getSubmitPdu( in sendRetrySms()
314 pdu = com.android.internal.telephony.cdma.SmsMessage.getSubmitPdu( in sendRetrySms()
319 pdu = com.android.internal.telephony.gsm.SmsMessage.getSubmitPdu( in sendRetrySms()
326 map.put("smsc", pdu.encodedScAddress); in sendRetrySms()
327 map.put("pdu", pdu.encodedMessage); in sendRetrySms()
DIccSmsInterfaceManager.java194 updateMessageOnIccEf(String callingPackage, int index, int status, byte[] pdu) { in updateMessageOnIccEf() argument
197 "("+ Arrays.toString(pdu) + ")"); in updateMessageOnIccEf()
224 byte[] record = makeSmsRecordData(status, pdu); in updateMessageOnIccEf()
247 public boolean copyMessageToIccEf(String callingPackage, int status, byte[] pdu, byte[] smsc) { in copyMessageToIccEf() argument
250 "pdu=("+ Arrays.toString(pdu) + in copyMessageToIccEf()
264 IccUtils.bytesToHexString(pdu), response); in copyMessageToIccEf()
266 mPhone.mCi.writeSmsToRuim(status, IccUtils.bytesToHexString(pdu), in copyMessageToIccEf()
466 public void injectSmsPdu(byte[] pdu, String format, PendingIntent receivedIntent) { in injectSmsPdu() argument
469 log("pdu: " + pdu + in injectSmsPdu()
473 mDispatcher.injectSmsPdu(pdu, format, receivedIntent); in injectSmsPdu()
[all …]
DInboundSmsTracker.java78 public InboundSmsTracker(byte[] pdu, long timestamp, int destPort, boolean is3gpp2, in InboundSmsTracker() argument
80 mPdu = pdu; in InboundSmsTracker()
110 public InboundSmsTracker(byte[] pdu, long timestamp, int destPort, boolean is3gpp2, in InboundSmsTracker() argument
113 mPdu = pdu; in InboundSmsTracker()
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/
DGsmSmsTest.java32 String pdu = "07914151551512f2040B916105551511f100006060605130308A04D4F29C0E"; in testAddressing() local
33 SmsMessage sms = SmsMessage.createFromPdu(HexDump.hexStringToByteArray(pdu)); in testAddressing()
38 pdu = "07914151551512f2040B916105551511f100036060924180008A0DA" in testAddressing()
40 sms = SmsMessage.createFromPdu(HexDump.hexStringToByteArray(pdu)); in testAddressing()
48 String pdu = "07914140279510F6440A8111110301003BF56080207130138A8C0B05040B8423F" in testUdh() local
54 SmsMessage sms = SmsMessage.createFromPdu(HexDump.hexStringToByteArray(pdu)); in testUdh()
67 pdu = "07914140279510F6440A8111110301003BF56080207130238A3B0B05040B8423F" in testUdh()
70 sms = SmsMessage.createFromPdu(HexDump.hexStringToByteArray(pdu)); in testUdh()
86 String pdu = "07912160130300F4040B914151245584F600087010807121352B1021220" in testUcs2() local
88 SmsMessage sms = SmsMessage.createFromPdu(HexDump.hexStringToByteArray(pdu)); in testUcs2()
[all …]
DWapPushOverSmsTest.java76 byte[] pdu = new byte[]{ in testDispatchWapPdu()
86 mWapPushOverSmsUT.dispatchWapPdu(pdu, null, mInboundSmsHandler); in testDispatchWapPdu()
107 assertEquals(pdu.length, data.length); in testDispatchWapPdu()
108 for (int i = 0; i < pdu.length; i++) { in testDispatchWapPdu()
109 assertEquals(pdu[i], data[i]); in testDispatchWapPdu()
128 byte pdu[] = {1, 6, 0, 97, 112, 112, 108, 105, 99, 97, 116, 105, 111, 110, 47, in testDispatchWapPduFromBlockedNumber_noIntentsDispatched()
139 mWapPushOverSmsUT.dispatchWapPdu(pdu, null, mInboundSmsHandler)); in testDispatchWapPduFromBlockedNumber_noIntentsDispatched()
DSimSmsTest.java45 byte[] pdu = null; in testBasic()
50 pdu = data.getBytes(); in testBasic()
61 assertNotNull(pdu); in testBasic()
/frameworks/opt/telephony/src/java/com/android/internal/telephony/cdma/
DCdmaInboundSmsHandler.java260 private int processCdmaWapPdu(byte[] pdu, int referenceNumber, String address, in processCdmaWapPdu() argument
264 int msgType = (0xFF & pdu[index++]); in processCdmaWapPdu()
269 int totalSegments = (0xFF & pdu[index++]); // >= 1 in processCdmaWapPdu()
270 int segment = (0xFF & pdu[index++]); // >= 0 in processCdmaWapPdu()
282 sourcePort = (0xFF & pdu[index++]) << 8; in processCdmaWapPdu()
283 sourcePort |= 0xFF & pdu[index++]; in processCdmaWapPdu()
284 destinationPort = (0xFF & pdu[index++]) << 8; in processCdmaWapPdu()
285 destinationPort |= 0xFF & pdu[index++]; in processCdmaWapPdu()
289 if (checkDuplicatePortOmadmWapPush(pdu, index)) { in processCdmaWapPdu()
301 byte[] userData = new byte[pdu.length - index]; in processCdmaWapPdu()
[all …]
DCdmaSMSDispatcher.java111 SmsMessage.SubmitPdu pdu = SmsMessage.getSubmitPdu( in sendData() local
113 if (pdu != null) { in sendData()
114 HashMap map = getSmsTrackerMap(destAddr, scAddr, destPort, data, pdu); in sendData()
145 SmsMessage.SubmitPdu pdu = SmsMessage.getSubmitPdu( in sendText() local
147 if (pdu != null) { in sendText()
148 HashMap map = getSmsTrackerMap(destAddr, scAddr, text, pdu); in sendText()
175 protected void injectSmsPdu(byte[] pdu, String format, PendingIntent receivedIntent) { in injectSmsPdu() argument
254 byte[] pdu = (byte[]) tracker.getData().get("pdu"); in sendSmsByPstn()
269 mCi.sendCdmaSms(pdu, reply); in sendSmsByPstn()
271 mCi.sendImsCdmaSms(pdu, tracker.mImsRetry, tracker.mMessageRef, reply); in sendSmsByPstn()
DSmsMessage.java111 public static SmsMessage createFromPdu(byte[] pdu) { in createFromPdu() argument
115 msg.parsePdu(pdu); in createFromPdu()
260 byte[] pdu = new byte[size]; in createFromEfRecord()
261 System.arraycopy(data, 2, pdu, 0, size); in createFromEfRecord()
264 msg.parsePduFromEfRecord(pdu); in createFromEfRecord()
276 public static int getTPLayerLengthForPDU(String pdu) { in getTPLayerLengthForPDU() argument
513 private void parsePdu(byte[] pdu) { in parsePdu() argument
514 ByteArrayInputStream bais = new ByteArrayInputStream(pdu); in parsePdu()
535 if (length > pdu.length) { in parsePdu()
538 + " > pdu len " + pdu.length); in parsePdu()
[all …]
/frameworks/base/packages/WAPPushManager/tests/src/com/android/smspush/unitTests/
DDataVerify.java68 public synchronized boolean verifyData(byte[] pdu) { in verifyData() argument
83 boolean ret = arrayCompare(pdu, mLastReceivedPdu); in verifyData()
107 public static void SetLastReceivedPdu(byte[] pdu) { in SetLastReceivedPdu() argument
108 mLastReceivedPdu = pdu; in SetLastReceivedPdu()
DWapPushTest.java1519 byte[] pdu = createPDU(1); in testProcessMsg1()
1520 int headerLen = pdu.length - in testProcessMsg1()
1560 byte[] pdu = createPDU(1); in testProcessMsg2()
1561 int headerLen = pdu.length - (mGsmHeader.length + in testProcessMsg2()
1602 byte[] pdu = createPDU(1); in testProcessMsg3()
1603 int headerLen = pdu.length - in testProcessMsg3()
1672 byte[] pdu = createPDU(1); in testProcessMsg4()
1673 int headerLen = pdu.length - in testProcessMsg4()
1732 pdu = createPDU(1); in testProcessMsg4()
1761 byte[] pdu = createPDU(2); in testProcessMsg5()
[all …]
DClientTest.java118 EditText pdu = (EditText) findViewById(R.id.pdu); in onCreate()
129 HexDump.hexStringToByteArray(pdu.getText().toString())); in onCreate()
131 HexDump.hexStringToByteArray(pdu.getText().toString())); in onCreate()
/frameworks/opt/telephony/src/java/com/google/android/mms/util/
DPduCacheEntry.java20 import com.google.android.mms.pdu.GenericPdu;
27 public PduCacheEntry(GenericPdu pdu, int msgBox, long threadId) { in PduCacheEntry() argument
28 mPdu = pdu; in PduCacheEntry()
/frameworks/opt/telephony/src/java/android/telephony/gsm/
DSmsManager.java180 public final boolean copyMessageToSim(byte[] smsc, byte[] pdu, int status) { in copyMessageToSim() argument
181 return mSmsMgrProxy.copyMessageToIcc(smsc, pdu, status); in copyMessageToSim()
210 public final boolean updateMessageOnSim(int messageIndex, int newStatus, byte[] pdu) { in updateMessageOnSim() argument
211 return mSmsMgrProxy.updateMessageOnIcc(messageIndex, newStatus, pdu); in updateMessageOnSim()
DSmsMessage.java151 public static SmsMessage createFromPdu(byte[] pdu) { in createFromPdu() argument
156 wrappedMessage = com.android.internal.telephony.cdma.SmsMessage.createFromPdu(pdu); in createFromPdu()
158 wrappedMessage = com.android.internal.telephony.gsm.SmsMessage.createFromPdu(pdu); in createFromPdu()
170 public static int getTPLayerLengthForPDU(String pdu) { in getTPLayerLengthForPDU() argument
174 return com.android.internal.telephony.cdma.SmsMessage.getTPLayerLengthForPDU(pdu); in getTPLayerLengthForPDU()
176 return com.android.internal.telephony.gsm.SmsMessage.getTPLayerLengthForPDU(pdu); in getTPLayerLengthForPDU()
/frameworks/opt/telephony/src/java/android/telephony/
DSmsMessage.java164 public static SmsMessage createFromPdu(byte[] pdu) { in createFromPdu() argument
172 message = createFromPdu(pdu, format); in createFromPdu()
178 message = createFromPdu(pdu, format); in createFromPdu()
195 public static SmsMessage createFromPdu(byte[] pdu, String format) { in createFromPdu() argument
199 wrappedMessage = com.android.internal.telephony.cdma.SmsMessage.createFromPdu(pdu); in createFromPdu()
201 wrappedMessage = com.android.internal.telephony.gsm.SmsMessage.createFromPdu(pdu); in createFromPdu()
267 public static int getTPLayerLengthForPDU(String pdu) { in getTPLayerLengthForPDU() argument
269 return com.android.internal.telephony.cdma.SmsMessage.getTPLayerLengthForPDU(pdu); in getTPLayerLengthForPDU()
271 return com.android.internal.telephony.gsm.SmsMessage.getTPLayerLengthForPDU(pdu); in getTPLayerLengthForPDU()
/frameworks/base/core/java/android/service/carrier/
DCarrierMessagingService.java126 public void onFilterSms(@NonNull MessagePdu pdu, @NonNull String format, int destPort, in onFilterSms() argument
154 public void onReceiveTextSms(@NonNull MessagePdu pdu, @NonNull String format, in onReceiveTextSms() argument
156 onFilterSms(pdu, format, destPort, subId, new ResultCallback<Boolean>() { in onReceiveTextSms()
465 public void filterSms(MessagePdu pdu, String format, int destPort, in filterSms() argument
467 onReceiveTextSms(pdu, format, destPort, subId, in filterSms()

123