4be1ab169dadd108cceff8f76067cf874bda9d97 |
|
19-Oct-2012 |
Jake Hamby <jhamby@google.com> |
Update CMAS duplicate message detection for carrier requirement. There is a carrier requirement for CMAS to use only an in-memory table for duplicate message ID detection. When the max number of 65535 messages is received, the oldest message ID is removed from the list. After a reboot, a previously received message ID will be considered a new message. This is required for CMAS lab testing. The app does not care if there are multiple rows in the SQLite DB with the same message ID, because the primary key is a unique ID. Remove the duplicate message detection from the CBContentProvider and use only the in-memory duplicate detection in CBAlertService. This is safe for other types of alerts such as ETWS, and has the benefit that a new alert will not be suppressed due to a very old alert with the same message ID that was never deleted from the DB. Message IDs are now stored in an ArrayList as well as a HashSet in CellBroadcastAlertService. When the 65535 message limit is reached, an index is used into the ArrayList to remove the oldest message ID from the HashSet. The new message ID replaces the old one in the ArrayList, so the size stays fixed at 65535 entries and no array copies are needed to replace the oldest message ID. Bug: 7045601 Change-Id: I2d08bf8131aa473648c5810913b62baa09a97756
/packages/apps/CellBroadcastReceiver/src/com/android/cellbroadcastreceiver/CellBroadcastContentProvider.java
|
57273ebfa13f96bf5aba9902b70e2b179fec9e4c |
|
09-Oct-2012 |
Jake Hamby <jhamby@google.com> |
Multiple fixes to CMAS app. * Allow screen to turn off after 30 seconds for emergency alerts. * When multiple alerts are received, show them in reverse order. * After showing the first CMAS alert received on device (other than Presidential Alert), show opt-out dialog to allow user to opt-in or out of the various levels of CMAS alert. * Start/stop animating warning icon in activity pause/resume. * When multiple non-emergency alerts are received, show them all (most recent displayed first) when user selects the notification. * For emergency alerts, start the dialog activity directly instead of creating a PendingIntent and full screen notification. * Correctly save/restore the list of alerts in the alert dialog in onSaveInstanceState() when recreated after screen rotation. * Fix test app to increment the message ID and to send the correct alerts when multiple alerts are selected with 5 second delay. Bug: 6993660 Bug: 7041847 Bug: 7045506 Change-Id: Ic3ec08f0ebd693244891a4bf3a29479b832c2a3e
/packages/apps/CellBroadcastReceiver/src/com/android/cellbroadcastreceiver/CellBroadcastContentProvider.java
|
eef14be1b2b77fc08a6cc5ef301ba49ea54c0c0a |
|
27-Jun-2012 |
Jake Hamby <jhamby@google.com> |
Fix CellBroadcastReceiver to ignore duplicate broadcasts. Before showing an alert dialog or notification, check to see if the broadcast message is already in the database. Bug: 6506785 Change-Id: I3063ef3d5355301e4292437348cf789ff540e0b1
/packages/apps/CellBroadcastReceiver/src/com/android/cellbroadcastreceiver/CellBroadcastContentProvider.java
|
da5c415f6d0999131e93384b5fb90422ada8e4da |
|
18-Apr-2012 |
Jake Hamby <jhamby@google.com> |
Add ContentProvider for received cell broadcasts. Enable apps with android.permission.READ_CELL_BROADCASTS to access the database of received cell broadcasts via a ContentProvider at URI "content://cellbroadcasts/". The ContentProvider is read-only, but provides internal methods for the app to insert and delete broadcasts, and to mark broadcasts as read. These methods are not exposed to other applications. Other changes: * Added static log() methods for simpler debug logging. * Moved CellBroadcastDatabase.DatabaseHelper to new top-level CellBroadcastDatabaseHelper class after refactoring the original CellBroadcastDatabase class out of existence. * Removed the "Delete" dialog title per Android UI guidelines, and changed from a custom view to a built-in dialog type. Bug: 5752924 Change-Id: I1ad6a4d5248f851c53a638c2cb7e85a57ba6b811
/packages/apps/CellBroadcastReceiver/src/com/android/cellbroadcastreceiver/CellBroadcastContentProvider.java
|