check if notification will display 2 lines

This commit is contained in:
sonora 2014-08-27 16:16:44 +02:00
parent b24970f711
commit bd677a36d8
2 changed files with 3 additions and 3 deletions

View file

@ -1271,7 +1271,7 @@ Afghanistan, Albania, Algeria, Andorra, Angola, Anguilla, Antigua and Barbuda, A
<string name="user_name_descr">Needed for openstreetmap.org submissions</string> <string name="user_name_descr">Needed for openstreetmap.org submissions</string>
<string name="user_password">Your OSM password</string> <string name="user_password">Your OSM password</string>
<string name="user_password_descr">Needed for openstreetmap.org submissions</string> <string name="user_password_descr">Needed for openstreetmap.org submissions</string>
<string name="osmand_service">Sleep mode functionality</string> <string name="osmand_service">Sleep mode</string>
<string name="osmand_service_descr">Use to run OsmAnd while screen is off</string> <string name="osmand_service_descr">Use to run OsmAnd while screen is off</string>
<string name="tip_rotation_switching">Map Orientation</string> <string name="tip_rotation_switching">Map Orientation</string>
<string name="tip_rotation_switching_t_v2">You can toggle whether and how the map display is rotated by repeatedly clicking on the map screen\'s compass icon. <string name="tip_rotation_switching_t_v2">You can toggle whether and how the map display is rotated by repeatedly clicking on the map screen\'s compass icon.

View file

@ -197,14 +197,14 @@ public class NavigationService extends Service implements LocationListener {
//Show currently active wake-up interval //Show currently active wake-up interval
int soi = settings.SERVICE_OFF_INTERVAL.get(); int soi = settings.SERVICE_OFF_INTERVAL.get();
String nt = getString(R.string.service_stop_background_service) + ". " + getString(R.string.gps_wake_up_timer) + ": "; String nt = getString(R.string.service_stop_background_service) + ".\n" + getString(R.string.gps_wake_up_timer) + ": ";
if (soi <= 90000) { if (soi <= 90000) {
nt = nt + Integer.toString(soi/1000) + " " + getString(R.string.int_seconds); nt = nt + Integer.toString(soi/1000) + " " + getString(R.string.int_seconds);
} else { } else {
nt = nt + Integer.toString(soi/1000/60) + " " + getString(R.string.int_min); nt = nt + Integer.toString(soi/1000/60) + " " + getString(R.string.int_min);
} }
notification.setLatestEventInfo(this, Version.getAppName(cl), nt, notification.setLatestEventInfo(this, Version.getAppName(cl) + " " + getString(R.string.osmand_service), nt,
PendingIntent.getBroadcast(this, 0, notificationIntent, PendingIntent.FLAG_UPDATE_CURRENT)); PendingIntent.getBroadcast(this, 0, notificationIntent, PendingIntent.FLAG_UPDATE_CURRENT));
NotificationManager mNotificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE); NotificationManager mNotificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
if (mStartForeground != null) { if (mStartForeground != null) {