3081824ff4942b9bd19db7a0d9918e188c7f69d1 |
|
14-May-2016 |
Ta-wei Yen <twyen@google.com> |
Add VisualVoicemailSmsFilter Several implementation exists for OMTP-like visual voicemail SMS interfaces because what type of SMS to use is not specified. Before this CL we can only handle data SMS using the DATA_SMS_RECEIVED broadcast. With this CL, we can handle data, text and type-0 SMS. SMS filters will potentially do actions base on the SMS or drop it, so proper priority should be established to make them work nicely together. The android framework already provides the CarrierMessagingService interface to filter SMS. There are 2 possible packages that implements the interface, the carrier package and the system package. One of them if any will be chosen to do the filtering. The carrier package is installed with user interaction and have complex restraints. The system package is preloaded by the OEM. If there's a carrier package, we will filter after the carrier package as it should have priority. If there's a system app, we will filter before it as we offered mechanism to enable/disable us. For type-0 SMS, we will filter it before it is going to be dropped. We will filter visual voicemail SMS based on the content of the message. A visual voicemail SMS should start with a certain prefix defined through TelephonyManager, have a event field, and the rest of the message is consist of OMTP key-value pairs. Future CL will add further restrictions like originating number and destination port number to reduce false positives. If the parsing succeeded, we will compile it into a intent and send a broadcast. The broadcast is to be made explicit in a future CL. Bug:27816386 Bug:27817303 Change-Id: I120418d344a1537ff006583759659fa025cac712 (cherry picked from commit 0aa683b47dfd8590f71d88e0814dade4503f0b5d)
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/VisualVoicemailSmsParserTest.java
|