summaryrefslogtreecommitdiffstats
path: root/telephony/java/android/telephony/cdma/CdmaSmsCbProgramData.java
Commit message (Collapse)AuthorAgeFilesLines
* Implement CMAS service category program results.Jake Hamby2012-07-251-9/+9
| | | | | | | | | | 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
* Add support for CMAS warning notifications over CDMA.Jake Hamby2012-03-131-0/+210
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactor SMS Cell Broadcast support to enable receiving CMAS warning notifications over CDMA. The CellBroadcastReceiver app must also be updated with the corresponding change. All cell broadcasts are now delivered as a Parcelable SmsCbMessage object in the "message" extra of the SMS_CB_RECEIVED_ACTION or SMS_EMERGENCY_CB_RECEIVED_ACTION, instead of as a GSM/UMTS "pdu" byte array. Existing functionality for ETWS and CMAS alerts over GSM/UMTS continues to be supported using the new radio-technology independent SmsCbMessage and related objects. Test cases are added to verify that valid and invalid broadcast data is handled appropriately. Unit testing discovered a bug in the BitwiseOutputStream utility class used by the added test cases. When the BitwiseOutputStream object must be expanded (in the private possExpand() method), the mEnd field is not updated to the new array size. This causes a new array to be allocated on every new write, and for all data beyond the original array allocation to be replaced with zeroes. Fixed by adding a line to possExpand() to update mEnd. Added a test case to BitwiseStreamsTest to verify the fix. Besides the test cases, BitwiseOutputStream is only used by BearerData in two places, both of which allocate a sufficient initial buffer. So the bug in BitwiseOutputStream is not critical to fix for normal operation, but should be fixed so that the test cases using it function correctly. Bug: 5856308 Change-Id: I201ecbf11607fd200aaae3cbb32561efabf65672
* Revert "Add support for CMAS warning notifications over CDMA." I'll submit ↵Jake Hamby2012-02-291-210/+0
| | | | | again when the app change is ready. This reverts commit 0c49f03a0429b5c0c4a619256f7bca86a4997ae8
* Add support for CMAS warning notifications over CDMA.Jake Hamby2012-02-281-0/+210
Refactor SMS Cell Broadcast support to enable receiving CMAS warning notifications over CDMA. The CellBroadcastReceiver app must also be updated with the corresponding change. All cell broadcasts are now delivered as a Parcelable SmsCbMessage object in the "message" extra of the SMS_CB_RECEIVED_ACTION or SMS_EMERGENCY_CB_RECEIVED_ACTION, instead of as a GSM/UMTS "pdu" byte array. Existing functionality for ETWS and CMAS alerts over GSM/UMTS continues to be supported using the new radio-technology independent SmsCbMessage and related objects. Test cases are added to verify that valid and invalid broadcast data is handled appropriately. Unit testing discovered a bug in the BitwiseOutputStream utility class used by the added test cases. When the BitwiseOutputStream object must be expanded (in the private possExpand() method), the mEnd field is not updated to the new array size. This causes a new array to be allocated on every new write, and for all data beyond the original array allocation to be replaced with zeroes. Fixed by adding a line to possExpand() to update mEnd. Added a test case to BitwiseStreamsTest to verify the fix. Besides the test cases, BitwiseOutputStream is only used by BearerData in two places, both of which allocate a sufficient initial buffer. So the bug in BitwiseOutputStream is not critical to fix for normal operation, but should be fixed so that the test cases using it function correctly. Bug: 5856308 Change-Id: Ie3e6af747976ce9b8a3e71e76fec71709cf86545