diff options
author | TreeHugger Robot <treehugger-gerrit@google.com> | 2017-05-23 01:08:56 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2017-05-23 01:08:58 +0000 |
commit | 7ad8eda9c877ed64c99f47eaa94feae9523263c9 (patch) | |
tree | f9a93a3b3c31853f0871a7eca099d6c40e073763 /src | |
parent | 51ef2d17c06d07f1630f63243c9c41c5b5193b9d (diff) | |
parent | bfe7c5543f1784b6c6baaac04099b4e846e7be17 (diff) | |
download | android_packages_apps_CellBroadcastReceiver-7ad8eda9c877ed64c99f47eaa94feae9523263c9.tar.gz android_packages_apps_CellBroadcastReceiver-7ad8eda9c877ed64c99f47eaa94feae9523263c9.tar.bz2 android_packages_apps_CellBroadcastReceiver-7ad8eda9c877ed64c99f47eaa94feae9523263c9.zip |
Merge "Added date/time to the title of the alert"
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/cellbroadcastreceiver/CellBroadcastAlertDialog.java | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/com/android/cellbroadcastreceiver/CellBroadcastAlertDialog.java b/src/com/android/cellbroadcastreceiver/CellBroadcastAlertDialog.java index 3d354775..e19ad070 100644 --- a/src/com/android/cellbroadcastreceiver/CellBroadcastAlertDialog.java +++ b/src/com/android/cellbroadcastreceiver/CellBroadcastAlertDialog.java @@ -353,8 +353,18 @@ public class CellBroadcastAlertDialog extends Activity { private void updateAlertText(CellBroadcastMessage message) { int titleId = CellBroadcastResources.getDialogTitleResource( getApplicationContext(), message); - setTitle(titleId); - ((TextView) findViewById(R.id.alertTitle)).setText(titleId); + + String title = getText(titleId).toString(); + TextView titleTextView = findViewById(R.id.alertTitle); + + if (getApplicationContext().getResources().getBoolean(R.bool.show_date_time_title)) { + titleTextView.setSingleLine(false); + title += "\n" + message.getDateString(getApplicationContext()); + } + + setTitle(title); + titleTextView.setText(title); + ((TextView) findViewById(R.id.message)).setText(message.getMessageBody()); String dismissButtonText = getApplicationContext().getResources() |