History log of /frameworks/opt/telephony/src/java/com/android/internal/telephony/SMSDispatcher.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
32cc74b9ec7397e995f4e2275315c6f79d1e43fd 10-Mar-2017 Tony Mak <tonymak@google.com> Track the calling user id in SmsTracker

Store the calling user id in SmsTracker, and consume it throughout
SmsDispatcher.

Test: SmsManager.sendTextMessage in user 0 is working
Test: SmsManager.sendTextMessage in work profile is working
(Make sure the app is not installed in user 0).

Fix: 35590739

Change-Id: I396880fe33bd0db05f7952dec6234def98f6b916
/frameworks/opt/telephony/src/java/com/android/internal/telephony/SMSDispatcher.java
4256e499c8e1e0a07998dcaf1f3aa127b693fc42 01-Feb-2017 Madhusudhan R. Adupala <amreddy@google.com> Enable SMS interception for CarrierIms Package.

Enable the interception of SMS by apps that are built onto
the system and are currently bound by the ImsResolver
for a particular subscription.

Bug: 29899506
Test: Manually verified

Change-Id: I0ca04b169d94df04ac6e18201384fc13da91a069
/frameworks/opt/telephony/src/java/com/android/internal/telephony/SMSDispatcher.java
96f2245d927c81fcd348bace3bc417bd0f91fb33 25-Jan-2017 Abhijith Shastry <ashastry@google.com> Add a TODO for checking IMS app for SMS sending.

BUG: 29899506
Test: Comment only, no code change.
Change-Id: I81746cee8a6da5b4fd40dd0b47ec313093d69f5c
/frameworks/opt/telephony/src/java/com/android/internal/telephony/SMSDispatcher.java
15f55ca2f204e664807e047b5f898693b274bab6 07-Jul-2016 fionaxu <fionaxu@google.com> Do not allow premium SMS during SuW

Bug: 29420123
Change-Id: I41ef7138635f11fbe7f495dd81103458cb969c35
/frameworks/opt/telephony/src/java/com/android/internal/telephony/SMSDispatcher.java
2eca414f1c7641c5b8069a09f191de7ebe692045 25-May-2016 fionaxu <fionaxu@google.com> sms app is able to control alert message

By changing the name of the application to include HTML characters, it
is possible to manipulate the warning message shown to the user when the
application then tries to send a premium rate SMS message.

Bug: 28557603
Change-Id: I4d43ca12f4ca3c1b00f9628a7301b63690379faf
/frameworks/opt/telephony/src/java/com/android/internal/telephony/SMSDispatcher.java
bc7737272e9951ccb9344c7b68263dcc3376fb43 08-Mar-2016 Amit Mahajan <amitmahajan@google.com> Merge "New permission to bypass premium short code check" into nyc-dev
bd5e7244c02d3af32ac260d6d240006a49b3a694 12-Feb-2016 Amit Mahajan <amitmahajan@google.com> New permission to bypass premium short code check

Bug: 18326557
Change-Id: Iefe319646c5e0d108b925609bba6597e8663ec4a
/frameworks/opt/telephony/src/java/com/android/internal/telephony/SMSDispatcher.java
6c68ad888284b1ac5b3f149a4a4b4c7d477b6ab9 03-Mar-2016 Ji Yang <yangji@google.com> Merge "Adapt to carrier message service API change." into nyc-dev
3fcaeac48c45f7fbefd2aeee8fe3094f40f9bf84 24-Feb-2016 Ji Yang <yangji@google.com> Adapt to carrier message service API change.

Check message filter callback result to decide whether to
show new message notificaiton.

BUG: 27292180

Change-Id: Idbf9715e16d099dbdd9f832821e613ca704720df
/frameworks/opt/telephony/src/java/com/android/internal/telephony/SMSDispatcher.java
5eccb26b2bcf3a51326596e1b0bb49b073d2f9fc 23-Feb-2016 Abhijith Shastry <ashastry@google.com> Suppress blocks after texting emergency services.

BUG: 26989170
Change-Id: I73216e5c433ba4ffb613d88b1d3fe3c81f3acba9
/frameworks/opt/telephony/src/java/com/android/internal/telephony/SMSDispatcher.java
14bdfdca7a5412edf5fbdd6573e0f608233a5ae8 24-Feb-2016 Amit Mahajan <amitmahajan@google.com> Unit test for GsmCdmaPhone (handling of messages rcvd on creation)

Includes access modifier cleanup in Phone

Bug: 25691379
Change-Id: If14eba8665f031c866a5d199078317d9d9e1291d
/frameworks/opt/telephony/src/java/com/android/internal/telephony/SMSDispatcher.java
5d5ca33a24e6b73a48b575a0e1a5e790784d0bb7 27-Jan-2016 Amit Mahajan <amitmahajan@google.com> Unit test for CdmaSmsDispatcher

Bug: 25691379
Change-Id: I9d4f209ad1a20435ae8841e5f15ce8a94b52fa42
/frameworks/opt/telephony/src/java/com/android/internal/telephony/SMSDispatcher.java
d1e1ef20799b3d6290523b613b5189dd3fe4812f 15-Jan-2016 Amit Mahajan <amitmahajan@google.com> Get rid of code to allow bypassing short-code confirmation dialog.

It was allowed based on permission SEND_RESPOND_VIA_MESSAGE but that
permission is used for other purposes and should not be used for this.
No app seems to require the ability to bypass the check so removing the
check altogether. If that ability is needed, a separate permission
should be added for it.

Bug: 23766433
Change-Id: Ie93f75725c316b39684cf740dfd161c084c60181
/frameworks/opt/telephony/src/java/com/android/internal/telephony/SMSDispatcher.java
1a87ab3d7170d618f048c4f5af8c7504a587aaa5 10-Dec-2015 Jack Yu <jackyu@google.com> Merge from master

Change-Id: Ifbd86600111d2c444031ff608fab62fb2ee4b236
/frameworks/opt/telephony/src/java/com/android/internal/telephony/SMSDispatcher.java
a8f8c5a113a66de4854f4fb13a5825eb0705bd59 23-Jul-2015 Ji Yang <yangji@google.com> Add API to let carrier app send SMS without auto persisting.

Bug: 22773702
Change-Id: Ib126e79b0d1e2f9a9a44afe2b3f1895c150bd86b
/frameworks/opt/telephony/src/java/com/android/internal/telephony/SMSDispatcher.java
ce058be9f5bcfdaa531f1b480ca5ed051b84e72e 09-Jul-2015 Tom Taylor <tomtaylor@google.com> Externally-reported Moderate severity vulnerability in SMS: Apps can bypass the SMS short code notification prompt

Bug 22314646

When android.permission.SEND_SMS_NO_CONFIRMATION was renamed to
android.permission.SEND_RESPOND_VIA_MESSAGE in JB-MR2, the necessary change
in SmsDispatcher was accidentally overlooked.

Change-Id: I84cbcaa0b7e199df04f11245d06b7fc7f02db7a0
/frameworks/opt/telephony/src/java/com/android/internal/telephony/SMSDispatcher.java
ade6a7a40779f907ba34142ad2286d532fcdebff 16-Apr-2015 Cheuksan Wang <edwang@google.com> add a parameter to carrier messaging calls to request delivery status

In the carrier messaging API, I forgot to add the parameter to request
delivery status. We need to add one more parameter (to indicate
requesting delivery status) to these calls:

onSendMultipartTextSms
onSendTextSms
onSendDataSms

BUG: 20224743
Change-Id: I8ad1b19cd0c703f9082178733ec59808103be805
/frameworks/opt/telephony/src/java/com/android/internal/telephony/SMSDispatcher.java
3ce96a061c2c6e24f4ff3bd237e18c29fc0c0108 19-Feb-2015 Amit Mahajan <amitmahajan@google.com> Adding a new param to calculateLength for SMS to indicate if called for a
segment of multipart msg.

Encoding type is calculated separately for entire msg vs individual
segments. Change is to avoid overwriting the calculated value for
individual segment based.

Bug: 19399335
Change-Id: I8e89b7596e9c7440ace0486eceb1252094c373fa
/frameworks/opt/telephony/src/java/com/android/internal/telephony/SMSDispatcher.java
f323afdb70b83e0c851ced2af7594b20412542c3 10-Feb-2015 Shishir Agrawal <shishir@google.com> SmsSenderCallback: Run the callback with the phone UID.

The SmsSenderCallback needs to run as the phone UID because of checks that
ensure only the messaging app or phone process can run that code.

Also modifies SmsUsageMonitor to allow phone process to make calls.

Bug: 19302541
Change-Id: Ic6b8141fbf15f42696e9b86d3c599ef2ec4ebd1c
/frameworks/opt/telephony/src/java/com/android/internal/telephony/SMSDispatcher.java
e70617d81dcd42350a737b11c25532e1d43df4ff 22-Jan-2015 Legler Wu <legler.wu@mediatek.com> [DS] Correct the access method for telephony system property

Revise the method to access telephony system property.
Add several PROPERTY_XXX_XXX_MSIM for MSIM type system properties. If
caller use the old one, it will be dispatched to new one and get by
default phone id.
Ex. PROPERTY_ICC_OPERATOR_NUMERIC

Bug: 18675498
Change-Id: I68b4de1817bb5a34d4a54685332f856e79a39d60
/frameworks/opt/telephony/src/java/com/android/internal/telephony/SMSDispatcher.java
52a98d0a37731f48a316bc79fbc2c5a0f00a5e58 27-Jan-2015 Ye Wen <ywen@google.com> Fix regression that stores data SMS automatically

A previous CL (ag/586092) accidentally auto persists data SMS sent by
non-default SMS app (which should only do that for text SMS).

b/19150134

Change-Id: I2f907b22aea2ce01bae3455a656f0e5a31978328
/frameworks/opt/telephony/src/java/com/android/internal/telephony/SMSDispatcher.java
062a2a3838c8d8adf16f4d9fbde8d52450da0336 13-Jan-2015 Shishir Agrawal <shishir@google.com> Make UICC code subID-less.

MSIM code introduced code in the UICC objects that refer to the subIds.
This is potentially very dangerous becuase subIds are only initialized after
the UICC object is completely initialized. Hence using subId in the UICC code
could lead to lots of properties being not set correctly.

The new code, uses the phoneId everywhere within the UICC code, which is
initialized when the UICC object is created and will remain constant for the
lifetime of the UICC object.

Bug: 18748407
Change-Id: I1f50abc40b8592751cdeca2de2c76ac9f2d40768
/frameworks/opt/telephony/src/java/com/android/internal/telephony/SMSDispatcher.java
8215559cd1141ac90c478fd3df75e43c9d755c6c 01-Nov-2014 Cheuksan Wang <edwang@google.com> Use the AIDL based API to communicate with the carrier app.

Implements SMS sending.

BUG: 18005911

Change-Id: I467036b59b51905532e7ce1591dcb2e2856ef2d3
/frameworks/opt/telephony/src/java/com/android/internal/telephony/SMSDispatcher.java
4b09dff383ae7dfca595aeeea886a594a1947340 22-Nov-2014 Wink Saville <wink@google.com> Additional changes to SubscriptionManager API as per API council.

bug: 17575308
Change-Id: Idd98aa46c15a9219ccf28091c62602ac8bf16c62
/frameworks/opt/telephony/src/java/com/android/internal/telephony/SMSDispatcher.java
4bd1dec4138ac11a91a8ec606a27fc4c5c63f14b 12-Nov-2014 Ye Wen <ywen@google.com> Stop persisting SMS into OUTBOX before sending

Persisting SMS into OUTBOX before sending proved to cause
problems with Messaging app (and potentially other apps) that could try
sending messages in OUTBOX without being asked as manifested in bug
b/18155366. This CL only presists SMS after it is being sent.

b/18202414

Change-Id: Ie0d0e088549bf0853b364e4d33eed2a5d79a7758
/frameworks/opt/telephony/src/java/com/android/internal/telephony/SMSDispatcher.java
b237a11044ed842d2865ff8c8716befb06b6ca25 25-Oct-2014 Wink Saville <wink@google.com> Change subId to int from long

Change-Id: Idae6335e63e7b1e4e714bc17e71b1a4705e38474
/frameworks/opt/telephony/src/java/com/android/internal/telephony/SMSDispatcher.java
6c376fea69306e22a2f11894d05cd0abfdaefed3 04-Oct-2014 Xia Ying <yingxia@motorola.com> [ADR] TS51.010-1 34.2.9.1 failed to send concatenated segments SMS to short
code

On handling EVENT_SEND_CONFIRMED_SMS, we should updte mExpectMore
based on mPendingTrackerCount.

Bug: 17570854
Change-Id: I9071031e30c724e05e9738dad3b476289dc79afc
/frameworks/opt/telephony/src/java/com/android/internal/telephony/SMSDispatcher.java
6ad88a8a2caf739e78c8d5f7f50fc7fa84a07ca7 24-Sep-2013 Chaitanya Saggurthi <csaggurt@codeaurora.org> Send SMS using RIL_REQUEST_SEND_SMS_EXPECT_MORE

1) New commandinterface API sendSMSExpectMore to send sms using
ril request RIL_REQUEST_SEND_SMS_EXPECT_MORE.
2) sendSMSExpectMore API to send multisegment sms pdu's except
last pdu in GSM. In case of retry use sendSms even for
multi segment message, because don't know how many
segments are failed to send

Bug: 17570854
Change-Id: Icfc200a9c9c5940f0e10668b4385d1633a6c943b
/frameworks/opt/telephony/src/java/com/android/internal/telephony/SMSDispatcher.java
934a24a6aa2b7a981e872fa350648904ed80280a 28-Aug-2014 Diego Pontoriero <diegs@google.com> Generalize getCarrierPackageNamesForBroadcastIntent utility method to work for all intent types.

Bug: 17163860
Change-Id: I4b013db09a521fbc41401e11cd60a0c7b0172b64
/frameworks/opt/telephony/src/java/com/android/internal/telephony/SMSDispatcher.java
78d39a9fab86a26f4f39585af5cfe2a07c756fce 30-Jul-2014 Shishir Agrawal <shishir@google.com> For long SMS pass SMS header concat ref details to the carrier app.

For Long SMS, either all the SMSes need to be sent by the carrier app or none.
To do this the carrier app needs to know information about the segmentation of
the message.

BUG: 16653081

Change-Id: I659ceafcbf93b3a88405174d4503b9eb30ad2764
/frameworks/opt/telephony/src/java/com/android/internal/telephony/SMSDispatcher.java
7f1a3f0ab65c144fde56e1246c5747b0c555034a 23-Jul-2014 Shishir Agrawal <shishir@google.com> UiccCarrierPrivilegeRules: changing getCarrierPackageNamesForBroadcastIntent to return a list.

Currently it returns the first matching package name. Now it will return a
list of all matching packages.

Change-Id: Icc0fc728e1e24235632ac38a482b06a7b829de78
/frameworks/opt/telephony/src/java/com/android/internal/telephony/SMSDispatcher.java
a0c22039b77054d659151537896c1db90c7057f7 22-Jul-2014 Shishir Agrawal <shishir@google.com> Make SMS outbound over carrier app work in airplane mode over WIFI.

Also fixes a security bug where an outbound message could be delivered to any
app, not just the carrier app for delivery.

Change-Id: Ic395b9340d88e5f00e38636f821bb5e2da89cddf
/frameworks/opt/telephony/src/java/com/android/internal/telephony/SMSDispatcher.java
a9552aa6bf3ce12c75ad43165034d9a1233fb131 21-Jul-2014 Shishir Agrawal <shishir@google.com> CarrierApp: Do not send broadcast if there is no carrier app.

Avoids an unnecessary broadcast.

Also fixes an NPE bug.

BUG=16454767
Change-Id: Idc8bff4c7a35b7ea0bb7446cd74515cf1675868d
/frameworks/opt/telephony/src/java/com/android/internal/telephony/SMSDispatcher.java
f1aeeb51f2c62420012122e0ccc75b3940c570e4 15-Jul-2014 Ye Wen <ywen@google.com> Messaging auto persist switch (2/4)

b/14095333

Change-Id: I9dccdadd72d951d86f83cb7adea9b2f09fad08ce
/frameworks/opt/telephony/src/java/com/android/internal/telephony/SMSDispatcher.java
c9394399180abbc32d04f6a3652ce22d5931e0b8 14-Jul-2014 Shishir Agrawal <shishir@google.com> Protecting messagings APIs for carrier access.

APIs protected by this CL:
- SMS injection.
- SMS filtering.
- SMS outbound broadcast.
- SMS outbound broadcast result.

Also moved much of the carrier checking logic from PhoneInterfaceManager to
the UiccCarrierPrivilegeRules for reusability.

BUG=15993876

Change-Id: I8309a1de23426dcc66a10383335cff9242920410
/frameworks/opt/telephony/src/java/com/android/internal/telephony/SMSDispatcher.java
b29851580bba4a13ddbf7a534d8b09295eb2c60f 10-Jul-2014 Ye Wen <ywen@google.com> New SMS and MMS APIs and semantics (2/4)

1. Rest of the new SMS and MMS APIs
2. Auto persisting MMS WAP Push
3. Partial multi-sim support
4. New SMS/MMS database columns: archived and creator
5. Record message creator
6. Mms config access APIs

b/14095333

Change-Id: Idb0ab75384b2c949f1a6ebe8f1c33e90a06a4d9b
/frameworks/opt/telephony/src/java/com/android/internal/telephony/SMSDispatcher.java
cafda9904d2804959d51697cdc63a185e687cb98 12-Jul-2014 Colin Cross <ccross@google.com> Revert "New SMS and MMS APIs and semantics (2/4)"

This reverts commit c5f9236283882b8e08390ac52e5b1fab2d3bc2fb.

Change-Id: I9585dabfc31611e68718859ea509b8f52535d9b5
/frameworks/opt/telephony/src/java/com/android/internal/telephony/SMSDispatcher.java
c5f9236283882b8e08390ac52e5b1fab2d3bc2fb 10-Jul-2014 Ye Wen <ywen@google.com> New SMS and MMS APIs and semantics (2/4)

1. Rest of the new SMS and MMS APIs
2. Auto persisting MMS WAP Push
3. Partial multi-sim support
4. New SMS/MMS database columns: archived and creator
5. Record message creator
6. Mms config access APIs

b/14095333

Change-Id: I9a4261753a803f520933b643c0bac708ab9f40a9
/frameworks/opt/telephony/src/java/com/android/internal/telephony/SMSDispatcher.java
370971c25973d9d8061b76e756df2fb8c1ebd990 28-Jun-2014 Ye Wen <ywen@google.com> MMS auto persisting (2/4)

1. Added new MMS message box type for failed messages
2. Use global static flag to temporarily turn off new SMS API semantics

b/14095333

Change-Id: I150a08a4b26bba6f3a7a1d8f848fe07c8be9298b
/frameworks/opt/telephony/src/java/com/android/internal/telephony/SMSDispatcher.java
fce79caf5d7628cde43c5f0cd3d369673bc15212 27-Jun-2014 Ye Wen <ywen@google.com> Send persisted SMS message URI through intent

1. Sent message URI is passed via sentIntent in sending API calls
2. Received message URI is passed via SMS deliver or received intent

Change-Id: I02ffd5294e41b2f81b03f79fc008bba44cf33d9f
/frameworks/opt/telephony/src/java/com/android/internal/telephony/SMSDispatcher.java
c99dab56e20222b28cbc6238645feac938f1c333 20-Jun-2014 Ye Wen <ywen@google.com> SMS message auto persisting for sending

1. Added auto persisting when sending SMS messages. This feature is
enabled by a system property to avoid breaking existing apps.
2. Removed SMSDispatcher.mRemainingMessages and added per message
sending part count for sending multipart messages.
3. Refactored code to handle message sent or failed. Fixed bug that in
some situation SendNextMsg is not sent for failures.

Change-Id: I3298b139e484f1238a5c04dcc39fa88398bba679
/frameworks/opt/telephony/src/java/com/android/internal/telephony/SMSDispatcher.java
d6bf802a1afd6dbd99b35804ec0ec565f2ac8e9e 23-Jun-2014 Cheuksan Wang <edwang@google.com> Merge "Send outbound messages via the default carrier app. Initially, the message will go into a pending state. There is a new API call to update the status of a message. If the carrier app cannot send the message, it will fall back to the default GSM/CDMA network."
8d8e8f45200d17b78d196d8cba389fd9c547ac11 21-Jun-2014 Cheuksan Wang <edwang@google.com> Send outbound messages via the default carrier app. Initially, the
message will go into a pending state. There is a new API call to
update the status of a message. If the carrier app cannot send the
message, it will fall back to the default GSM/CDMA network.

This is the same cl as 476721 which has already been approved by jsh@

Change-Id: I51d732b9cc40b371f77fd26d28e0836a466afc71
/frameworks/opt/telephony/src/java/com/android/internal/telephony/SMSDispatcher.java
d498f853cb523efef7bd06629e222ea105104b11 20-Jun-2014 Ji Yang <yangji@google.com> Merge "Sorry, clicked the wrong button."
f653f91baeb35b18a47c8f80b6ca1b1361dea238 20-Jun-2014 Ji Yang <yangji@google.com> Sorry, clicked the wrong button.

Revert "Send outbound message via the default carrier app. Initially, the message will go into a pending state. There is a new API call to update the status of a message. If the carrier app cannot send the message, it will fall back to the default GSM/CDMA networ"

This reverts commit 112c36a6080b6902925d317218acc14183e29842.

Change-Id: I087672cf17551bcef438df30e97e8859e1060a2a
/frameworks/opt/telephony/src/java/com/android/internal/telephony/SMSDispatcher.java
7fac90e635330be124a709db5774b71ff3892348 20-Jun-2014 Ji Yang <yangji@google.com> Merge "Send outbound message via the default carrier app. Initially, the message will go into a pending state. There is a new API call to update the status of a message. If the carrier app cannot send the message, it will fall back to the default GSM/CDMA network."
112c36a6080b6902925d317218acc14183e29842 30-May-2014 Cheuksan Wang <edwang@google.com> Send outbound message via the default carrier app. Initially, the
message will go into a pending state. There is a new API call to
update the status of a message. If the carrier app cannot send the
message, it will fall back to the default GSM/CDMA network.

Change-Id: I12e4c16ee1f934561c453e125805d59a151271b4
/frameworks/opt/telephony/src/java/com/android/internal/telephony/SMSDispatcher.java
63418bbd2a9d7cc88ae24cc5ae776c01d688fc3a 03-Jun-2014 Anil Muthineni <anilmuthineni@google.com> Add api to inject SMS PDUs

Change-Id: I58a518a7a6d6f43fef3d989bc0c8b21959404ed0
/frameworks/opt/telephony/src/java/com/android/internal/telephony/SMSDispatcher.java
ace9a749c5a2a5e07527f728b7331423d16c36cd 30-Oct-2013 Sukanya Rajkhowa <srajkh@codeaurora.org> SMS over IMS bug fixes

This change includes the following:
1) SMS over IMS remaining patches which address review comments

2) Fix for Bug:11378993
For MT SMS over IMS, if an application uses the createFromPdu(byte[] pdu) API
instead of createFromPdu(byte[] pdu,String format) API, we first try to create
SmsMessage from raw PDU with the format of active phone. That either returns a
valid SmsMessage object or throws a RuntimeException causing the correct format
to be used the next time. If GsmSmsAddress is not valid, we should throw
a RuntimeException which is handled by createFromPdu(byte[] pdu)

3) Fix for Bug:11424054
Register for ICC changes and handle new SMS on ICC

Bug: 11378993, 11424054
Change-Id: I94bcfcf93d8205c2916997091617899c6ebdd5e5
/frameworks/opt/telephony/src/java/com/android/internal/telephony/SMSDispatcher.java
4931e2c19616ab5985f61f343b231efb33692241 01-Nov-2013 Zhihai Xu <zhihaixu@google.com> problem to send SMS message by bluetooth MAP profile.

Currently SMSDispatcher will add the message to Sms.Sent database
for all non default SMS application.
This won't work for Bluetooth MAP profile.
In the bluetooth MAP spec, at 5.8 PushMessageFunction,
there are a parameter to control how to send the message by Bluetooth MAP.
Transparent:This parameter may be used to indicate to the MSE(phone)
that no copy of the message shall be kept in the 'Sent' folder
after the message was sent. This is especially useful for telematics applications,
e.g., frequent sending of car's speed and position for traffic measurements
(floating car data).
This application parameter is optional. The value of this parameter is "OFF"
(keep messages in 'Sent' folder) and "ON" (don't keep messages in Sent' folder).
If Transparent is "ON", we shouldn't put the message in Sent folder.
SMSDispatcher always put the message in Sms.Sent
which is mapped to the Sent folder in bluetooth MAP.
Prefer to let bluetooth to decide whether put the message in Sms.Sent based
on Transparent parameter value.

bug:11454636
Change-Id: I2e6c8deb5c4ed8bc9a3d90d492f4d4eb7dac7e5c
/frameworks/opt/telephony/src/java/com/android/internal/telephony/SMSDispatcher.java
0217e2d6e60f7edd95407c7b385a627da9f1c1e3 17-Oct-2013 David Braun <dabraun@google.com> Persist SMS messages sent by other than the default SMS app

Bug: 11256715 SmsManger.sendTextMessage() and SmsManager.sendMultiPartTextMessage() need to store the message in SmsProvider if called from non-default SMS app
Change-Id: I9f08435edd767f39863d018d59ec1d44e3d2128b
/frameworks/opt/telephony/src/java/com/android/internal/telephony/SMSDispatcher.java
1260f1c6c909f2940989b72afe1b91fd83845eaa 14-Sep-2013 Sukanya Rajkhowa <srajkh@codeaurora.org> Support SMS over IMS

ImsSMSDispatcher is part of IccSmsInterfaceManager.
It always receives calls to send sms first and decides
whether to use ims call flow or gsm/cdma based on response
to REQUEST_IMS_REGISTRATION_STATE.

When ims is registered and sms is supported, the request also returns
sms format to use.

In case of sms over ims failure, RIL_REQUEST_IMS_SEND_SMS sets
messageRef from RIL_SMS_RESPONSE of corresponding failed MO SMS, and
sets retry field to non-zero. If voice is available, sends
RIL_REQUEST_IMS_SEND_SMS retries with data encoded based on voice tech
available. If voice is not available, sets retry counter to max and
skips retries and sends failure to client.

Bug: 9626411

Change-Id: I4c63c8fc0eb2191847b509e66772e3de27d491ed
Signed-off-by: Ed Tam <etam@google.com>

Conflicts:
src/java/com/android/internal/telephony/gsm/GSMPhone.java
/frameworks/opt/telephony/src/java/com/android/internal/telephony/SMSDispatcher.java
ec125af4306f1be2c829c3a1d7adbf9b8cd7e659 06-Aug-2013 William Luh <williamluh@google.com> Change the SMS event logging to "packages" aggregation, which requires the app uid.

Change-Id: Ic3927b5764909b4ec8dc64fc41118f9057814656
/frameworks/opt/telephony/src/java/com/android/internal/telephony/SMSDispatcher.java
634a24f56f54b5d2911649288147c750b67c7ae4 23-Jul-2013 William Luh <williamluh@google.com> Add prefix to SMS event tag

Legal requires user consent for logging these in production (non-dogfood).
We will be filtering based on the specific tag prefix of exp_det_.

Change-Id: Id3d869c1b31716cee3e6ae98d3b840ef7f948e42
/frameworks/opt/telephony/src/java/com/android/internal/telephony/SMSDispatcher.java
0d4bcdf379842af4b6304809156971e926f374f0 18-Mar-2013 Jake Hamby <jhamby@google.com> Refactor inbound (MT) SMS handling into new handler classes.

Moved all MT SMS handling to separate StateMachine classes, which
save all incoming PDUs in the SmsProvider "raw" table, previously
used only for storing PDUs of concatenated messages. Then we ACK the
message, before starting the ordered broadcast as usual. If a receiver
of the broadcast sets the status to failure, we ignore it, but in the
future we could provide a mechanism to redeliver the broadcast.

New classes are (without com.android.internal.telephony prefix):
- CellBroadcastHandler
- InboundSmsHandler
- InboundSmsTracker
- SmsBroadcastUndelivered
- WakeLockStateMachine
- cdma.CdmaInboundSmsHandler
- cdma.CdmaServiceCategoryProgramHandler
- gsm.GsmCellBroadcastHandler
- gsm.GsmInboundSmsHandler

This fixes a bug in the SMS dispatcher. Previously we delivered
incoming SM's as ordered broadcasts and then sent an acknowledgment
to the SMSC after the broadcast completed. It was possible for the
ordered broadcast to take over 20 seconds to complete, causing SMS
retransmissions because we didn't ACK quickly enough. Also, a
broadcast receiver could set the result code to failure (the AOSP
MMS app never does this), causing us to negatively acknowledge the
SMS, potentially leading to many retries and a backlog on the SMSC.

The reason for saving all PDUs in the raw table before ACKing is so
InboundSmsHandler can handle the failure case of a device crash or
power failure in between ACKing the message and the delivery of the
ordered broadcast to receivers. This is handled when the Phone class
starts, creating a new thread to run SmsBroadcastUndelivered.
This Runnable scans the raw table once, finding all complete
PDUs and sending IncomingSmsTrackers to the state machine to
broadcast them again to receivers. In the worst case, a message might
be added twice to the MMS inbox, but it won't be lost.

However, due to the current MMS app implementation, which immediately
acknowledges the ordered broadcast before starting a new Service to
process the message, there is a very short window of time when a
message could potentially be lost, if the MMS app or device crashed
after the ordered broadcast returns and the message is deleted from
the raw table, but before the MMS service has added the message to
its own tables. To fix this will probably require API changes.

Another improvement from this change: SmsBroadcastUndelivered also
deletes PDUs for incomplete multipart messages that are older than
30 days. We've never garbage collected this table in the past, so
it's possible for a phone to accumulate a number of old PDUs in the
raw table if not all components arrived successfully.

The wake lock handling is also improved in this version, as we now
acquire a wakelock when the state machine leaves the Idle state,
releasing it 3 seconds after returning to the idle state, instead
of the previous 5-second timeout. If a new SMS arrives while a
broadcast is being delivered, we add it to the raw table and ACK the
new PDU immediately, then send the InboundSmsTracker as a message to
handle when the previous broadcast completes.

In order to keep track of whether a PDU is in 3GPP or 3GPP2 format,
the destination port column of the raw table is extended with three
flags: 3GPP format, 3GPP2 format, and no destination port present.
Because the destination port is a 16-bit value in both 3GPP and
3GPP2, the upper bits of the destination port can be used for flags.
This saves us from having to modify the SMS provider to update the
DB version and to add extra columns to keep track of these flags.

Bug: 7099232
Change-Id: Ibbc01ccb83320f4b6112fe3dd31355eb6f570b67
/frameworks/opt/telephony/src/java/com/android/internal/telephony/SMSDispatcher.java
5a176f73dbb2bff2ca8b8f86af86a17be6863b87 11-Mar-2013 Wink Saville <wink@google.com> Merge commit '958e7316' into fix-merge-conflict

* commit '958e7316':
Telephony: Set TP-RD to 1 in case of retry

Change-Id: I298e588b1076686e2c7c4b3714b46d2637b04079
454c5783e7695feec276325920550b2d4dcc3e16 07-Jun-2012 Rika Brooks <rbrooks@codeaurora.org> Telephony: Set TP-RD to 1 in case of retry

per TS 23.040 Section 9.2.3.6: In the case where no response or an
RP-ERROR with an appropriate cause value (see 3GPP TS 24.011 [13]) is
received in response to an SMS-SUBMIT, then the MS shall automatically
repeat the SMS-SUBMIT but must use the same TP-MR value
and set the TP-RD bit to 1 (see 9.2.3.25)

Bug: 8323645
Change-Id: I1c7ebc67f80a6eeba456ab0dc5f6331a038d7ab2
/frameworks/opt/telephony/src/java/com/android/internal/telephony/SMSDispatcher.java
22d85a8e3a575a6d01d2c788587971657dfe20c6 23-Feb-2013 Wink Saville <wink@google.com> Clean up member variables.

Change-Id: Ib60f350131ade626aca682407ea0b4377b16f6c6
/frameworks/opt/telephony/src/java/com/android/internal/telephony/SMSDispatcher.java
cbaa45bbf2cab852b6c9c3a887e9f803d4e857ea 23-Feb-2013 Wink Saville <wink@google.com> Clean up

- Add @Overrides where needed.
- Update javadoc comments
- Remove extra semi-colons
- Rename DataConnection.java to DataConnectionBase.java
- Rename GsmDataConnection.java to DataConnection.java
- Add defaults to switch statements
- Remove/fix most "if (false)" statements. Fixed by using a CONSTANT
- Fix hidden variables by hoisting to base class or renaming
- Tweak some debug output

Change-Id: If38de2fdeaacafbf40cdfd7f84dc5c52030ba2a3
/frameworks/opt/telephony/src/java/com/android/internal/telephony/SMSDispatcher.java
7fce994eb223105829becb6c26e3af7a9739752c 05-Feb-2013 Dianne Hackborn <hackbod@google.com> Add new app ops for sending/receiving SMS messages.

There are a variety of new app ops for various kind of
SMS operations: reading, writing, sending, receiving, on
ICC card, MMS, etc. These are instrumented in the telephony
framework; the controls for access to these features are
rolled up to either sending or receiving SMS.

Change-Id: Ie18b09d77fac555aaa169eb6fdfba44dd8078976
/frameworks/opt/telephony/src/java/com/android/internal/telephony/SMSDispatcher.java
eabfd15c321499201e9d150fe16288c2d43b7787 10-Jan-2013 Jake Hamby <jhamby@google.com> Merge "Telephony: Don't ack CB messages"
ac57a399534677ebfcfef530f1529d5d7f3d3c49 09-Jan-2013 Jake Hamby <jhamby@google.com> Merge "Telephony: Check SmsTracker's mSentIntent for null"
ded9c0af7fa49504c047275ed34c2d3b22bf0c3a 07-Dec-2012 Wink Saville <wink@google.com> Use Rlog

Change-Id: Ie013f51215de8380b8de74161b6056b010711cfd
/frameworks/opt/telephony/src/java/com/android/internal/telephony/SMSDispatcher.java
78df2f47241a498bbd919c4c19a44b824e5dc2d6 25-Sep-2012 Robert Greenwalt <rgreenwalt@google.com> Fix the premium-SMS UI.

Add instructions to undo permanent selections.
bug:7205024

Change-Id: I970e41019c66ef77ed62c9cd017571e308744380
/frameworks/opt/telephony/src/java/com/android/internal/telephony/SMSDispatcher.java
ee7b6094d4f3d4c641e54246aec8f61349d6e9d0 22-Sep-2012 Robert Greenwalt <rgreenwalt@google.com> Add gservices-controllable rules policy.

Allows using SIM country, network country or the most restrictive of both.
bug:7205426

Change-Id: I4f7ec6ef884d8cc3665fe60290c167740f17d9e7
/frameworks/opt/telephony/src/java/com/android/internal/telephony/SMSDispatcher.java
5d875796122cdd8a7004e8e3964b20b5c65a31a1 20-Sep-2012 Robert Greenwalt <rgreenwalt@google.com> Fix string in sms_short_code confirm dialog.

Typo used the wrong string giving "allow, allow" options after toggling
the remember-my-choice checkbox.

bug:7198380
Change-Id: Ia9bf3da44a1153838c618bd8c6b722235629e853
/frameworks/opt/telephony/src/java/com/android/internal/telephony/SMSDispatcher.java
4658a1a8c23111d5cc89feb040ce547a7b65dfb0 06-Sep-2012 Jake Hamby <jhamby@google.com> Add support for per-package policy for sending premium SMS.

The default behavior for sending a message to a premium SMS
short code (or suspected premium SMS number) is to ask the user for
confirmation. Enable the user to set a default policy ("remember this
choice" checkbox) to always/never allow the app to send SMS to
premium short codes in the future. The policy can be changed by
the Settings app in the app info screen.

Bug: 5513975
Change-Id: I82731bbc6631ac79b1b5d1d9b1f96c7100ab20cf
/frameworks/opt/telephony/src/java/com/android/internal/telephony/SMSDispatcher.java
2029d86b5aebd03f7acbd249a4e2e4f65ec37d47 08-Sep-2012 Geremy Condra <gcondra@google.com> Add event logging for SMS

This allows us to gather metrics about unwanted SMS use on
dogfood devices.

Change-Id: I00820b12219dde918d6d7adee3ccf03c576424c9
/frameworks/opt/telephony/src/java/com/android/internal/telephony/SMSDispatcher.java
bb8277c9c32f77d71dcc393b9baa19a3ffbeb0a6 15-Aug-2012 Alex Yakavenka <ayakaven@codeaurora.org> Telephony: Don't ack CB messages

SmsDispatcher receives its own broadcast to ack messages.
CB message needs to be excluded from the acking code since
it should not be acked.

Change-Id: I3f1496bb0c81a8edcc4173661e2ca75b03a9c6fb
/frameworks/opt/telephony/src/java/com/android/internal/telephony/SMSDispatcher.java
a13eb8b86f22b0efcfb888e2491b007d3424dddd 08-Nov-2011 Rekha Kumar <rekhak@codeaurora.org> Telephony: Check SmsTracker's mSentIntent for null

When SmsManager's sendMultipartTextMessage is invoked with null sentIntents,
the SmsTracker object is initialized with mSentIntent as null.
This causes NullPointerException.

Change-Id: I545c4a23676ba67f6a5523f15564993f001e48ca
/frameworks/opt/telephony/src/java/com/android/internal/telephony/SMSDispatcher.java
b8a13d300b245e0080aa01275e232f54d5d0e09c 25-Jul-2012 Jake Hamby <jhamby@google.com> Implement CMAS service category program results.

Correctly handle CDMA Service Category Program Data requests,
and send the SCPT response to the message center. Parcel SCPD
operations as an ArrayList instead of an array (current version
will throw ClassCastException when the array is cast).

Bug: 6853691
Change-Id: I949ea68891c78306059248832e59a593ab606e11
/frameworks/opt/telephony/src/java/com/android/internal/telephony/SMSDispatcher.java
c38bb60d867c5d61d90b7179a9ed2b2d1848124f 12-Jul-2012 Wink Saville <wink@google.com> Create telephony-common - DO NOT MERGE

telephony-common was created by moving some of
frameworks/base/telephony
to:
frameworks/opt/telephony

Change-Id: I32cbb5eec1fa239c1587e055c8f7ef4fc48fb62c
/frameworks/opt/telephony/src/java/com/android/internal/telephony/SMSDispatcher.java
0825495a331bb44df395a0cdb79fab85e68db5d5 12-Jul-2012 Wink Saville <wink@google.com> Create telephony-common

telephony-common was created by moving some of
frameworks/base/telephony
to:
frameworks/opt/telephony

Change-Id: I32cbb5eec1fa239c1587e055c8f7ef4fc48fb62c
/frameworks/opt/telephony/src/java/com/android/internal/telephony/SMSDispatcher.java