summaryrefslogtreecommitdiffstats
path: root/src/com/android/cellbroadcastreceiver/CellBroadcastAlertDialog.java
diff options
context:
space:
mode:
authorJake Hamby <jhamby@google.com>2012-10-08 19:41:30 -0700
committerJake Hamby <jhamby@google.com>2012-10-12 14:47:59 -0700
commit57273ebfa13f96bf5aba9902b70e2b179fec9e4c (patch)
tree1355d9061b21f2f81a2c87a6eea51801be497c8d /src/com/android/cellbroadcastreceiver/CellBroadcastAlertDialog.java
parentd2869a10f34780efe8eecfe2719faaa91494a1b3 (diff)
downloadandroid_packages_apps_CellBroadcastReceiver-57273ebfa13f96bf5aba9902b70e2b179fec9e4c.tar.gz
android_packages_apps_CellBroadcastReceiver-57273ebfa13f96bf5aba9902b70e2b179fec9e4c.tar.bz2
android_packages_apps_CellBroadcastReceiver-57273ebfa13f96bf5aba9902b70e2b179fec9e4c.zip
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
Diffstat (limited to 'src/com/android/cellbroadcastreceiver/CellBroadcastAlertDialog.java')
-rw-r--r--src/com/android/cellbroadcastreceiver/CellBroadcastAlertDialog.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/com/android/cellbroadcastreceiver/CellBroadcastAlertDialog.java b/src/com/android/cellbroadcastreceiver/CellBroadcastAlertDialog.java
index 3be8439d..f2509284 100644
--- a/src/com/android/cellbroadcastreceiver/CellBroadcastAlertDialog.java
+++ b/src/com/android/cellbroadcastreceiver/CellBroadcastAlertDialog.java
@@ -45,7 +45,7 @@ public class CellBroadcastAlertDialog extends CellBroadcastAlertFullScreen {
// Listen for the screen turning off so that when the screen comes back
// on, the user does not need to unlock the phone to dismiss the alert.
- if (mMessage.isEmergencyAlertMessage()) {
+ if (CellBroadcastConfigService.isEmergencyAlertMessage(getLatestMessage())) {
mScreenOffReceiver = new ScreenOffReceiver();
registerReceiver(mScreenOffReceiver,
new IntentFilter(Intent.ACTION_SCREEN_OFF));
@@ -74,8 +74,8 @@ public class CellBroadcastAlertDialog extends CellBroadcastAlertFullScreen {
private void handleScreenOff() {
// Launch the full screen activity but do not turn the screen on.
Intent i = new Intent(this, CellBroadcastAlertFullScreen.class);
- i.putExtra(CellBroadcastMessage.SMS_CB_MESSAGE_EXTRA, mMessage);
- i.putExtra(SCREEN_OFF, true);
+ i.putParcelableArrayListExtra(CellBroadcastMessage.SMS_CB_MESSAGE_EXTRA, mMessageList);
+ i.putExtra(SCREEN_OFF_EXTRA, true);
startActivity(i);
finish();
}