summaryrefslogtreecommitdiffstats
path: root/src/com/android/cellbroadcastreceiver/CellBroadcastAlertFullScreen.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/cellbroadcastreceiver/CellBroadcastAlertFullScreen.java')
-rw-r--r--src/com/android/cellbroadcastreceiver/CellBroadcastAlertFullScreen.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/com/android/cellbroadcastreceiver/CellBroadcastAlertFullScreen.java b/src/com/android/cellbroadcastreceiver/CellBroadcastAlertFullScreen.java
index 8110e1e2..e941f7cc 100644
--- a/src/com/android/cellbroadcastreceiver/CellBroadcastAlertFullScreen.java
+++ b/src/com/android/cellbroadcastreceiver/CellBroadcastAlertFullScreen.java
@@ -43,7 +43,9 @@ import android.widget.ImageView;
import android.widget.TextView;
import java.util.ArrayList;
+import java.util.Date;
import java.util.concurrent.atomic.AtomicInteger;
+import java.text.SimpleDateFormat;
/**
* Full-screen emergency alert with flashing warning icon.
@@ -370,8 +372,16 @@ public class CellBroadcastAlertFullScreen extends Activity {
/** Update alert text when a new emergency alert arrives. */
private void updateAlertText(CellBroadcastMessage message) {
- int titleId = CellBroadcastResources.getDialogTitleResource(message);
+ int titleId = CellBroadcastResources.getDialogTitleResource(this, message);
setTitle(titleId);
+ if (getResources().getBoolean(R.bool.enable_colombia_channels)) {
+ SimpleDateFormat formatter = new SimpleDateFormat("hh:mm:ss dd/MM/yyyy");
+ String timestampStr = formatter.format(new Date(message.getDeliveryTime()));
+
+ TextView timestampView = (TextView) findViewById(R.id.timestamp);
+ timestampView.setVisibility(View.VISIBLE);
+ timestampView.setText(timestampStr);
+ }
((TextView) findViewById(R.id.alertTitle)).setText(titleId);
((TextView) findViewById(R.id.message)).setText(message.getMessageBody());