History log of /frameworks/opt/telephony/src/java/com/android/internal/telephony/InboundSmsTracker.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
0a0852c293e26e15d0ab4c286b5aa9b3db287ebc 11-May-2016 Abhijith Shastry <ashastry@google.com> Populate destination address in InboundSmsTracker.

This code path is used to deliver undelivered messages.

BUG: 28715722
Change-Id: Ia22ef9130f9ebdda5e7a1f03ec7a71fa8d4663d2
/frameworks/opt/telephony/src/java/com/android/internal/telephony/InboundSmsTracker.java
6e4abd849e12860a7459f7ec74496ca02b9d7ee0 28-Mar-2016 Amit Mahajan <amitmahajan@google.com> Changes to de-dup messages in SMS raw table.

Bug: 27820591
Change-Id: Ie3a28cdbbb533c74f456b7e942ddfc2cd0d66bb0
/frameworks/opt/telephony/src/java/com/android/internal/telephony/InboundSmsTracker.java
05ce040e990b396a4273dc9c8efde364a2afb5bc 12-Feb-2016 Amit Mahajan <amitmahajan@google.com> Updates to InboundSmsHandler tests and sendOrderedBroadcast support

Bug: 25691379

Change-Id: I49b06a5223f1e9693e747282f7a83a1322bb887f
/frameworks/opt/telephony/src/java/com/android/internal/telephony/InboundSmsTracker.java
270e2658281af04247c4fca07a60c39f37f37199 01-Feb-2016 Amit Mahajan <amitmahajan@google.com> resolve merge conflicts of 003753ff3b to master.

Change-Id: I75538817050719a9bede694e9a42a2eebcfe83d2
604d70ccbf958d1abd92b128fa18a9f17b42b133 30-Jan-2016 Amit Mahajan <amitmahajan@google.com> Cleanup access modifiers.

This is useful for tests. CL also includes minor cleanup in SST.

Bug: 25793157
Change-Id: I068af6bfd9ea9e04e95244d23f830731aef38ee1
/frameworks/opt/telephony/src/java/com/android/internal/telephony/InboundSmsTracker.java
ba51280f53e677ac527b11bd9a5dfa819740f70a 22-Jan-2016 Abhijith Shastry <ashastry@google.com> Block SMS, and MMS from blocked numbers.

BUG: 26682753
Change-Id: I464c04466d3a936d2d611cbaf791490340a9f515
/frameworks/opt/telephony/src/java/com/android/internal/telephony/InboundSmsTracker.java
8b61e10b480d3a7bae41025a97f3bd27ee5ed610 11-Sep-2013 Jake Hamby <jhamby@google.com> Fix receiving multi-part CDMA WAP messages.

Fix ArrayIndexOutOfBoundsException in CDMA WAP message handling.
Add a new flag to raw DB table to indicate 3GPP2 WAP PDU messages.
Use the new flag to return the correct value for getIndexOffset()
in InboundSmsTracker.

Previously this only worked correctly for single-segment WAP PDUs
of type WAP push.

Bug: 10595053
Change-Id: I8820da124e8fa4707cbee0398690a475d26ff702
/frameworks/opt/telephony/src/java/com/android/internal/telephony/InboundSmsTracker.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/InboundSmsTracker.java