show currently active wake-zup interval also in notification area
This commit is contained in:
parent
4da2452e6c
commit
d6950f2111
2 changed files with 13 additions and 3 deletions
|
@ -194,7 +194,17 @@ public class NavigationService extends Service implements LocationListener {
|
|||
Notification notification = new Notification(R.drawable.bgs_icon, "", //$NON-NLS-1$
|
||||
System.currentTimeMillis());
|
||||
notification.flags = Notification.FLAG_NO_CLEAR;
|
||||
notification.setLatestEventInfo(this, Version.getAppName(cl), getString(R.string.service_stop_background_service),
|
||||
|
||||
//Show currently active wake-up interval
|
||||
int soi = settings.SERVICE_OFF_INTERVAL.get();
|
||||
String nt;
|
||||
if (soi <= 90000) {
|
||||
nt = getString(R.string.service_stop_background_service)+ ": " + Integer.toString(soi/1000) + " " + getString(R.string.int_seconds);
|
||||
} else {
|
||||
nt = getString(R.string.service_stop_background_service)+ ": " + Integer.toString(soi/1000/60) + " " + app.getString(R.string.int_seconds);
|
||||
}
|
||||
|
||||
notification.setLatestEventInfo(this, Version.getAppName(cl), nt,
|
||||
PendingIntent.getBroadcast(this, 0, notificationIntent, PendingIntent.FLAG_UPDATE_CURRENT));
|
||||
NotificationManager mNotificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
|
||||
if (mStartForeground != null) {
|
||||
|
|
|
@ -106,9 +106,9 @@ public class MapInfoWidgetsFactory {
|
|||
//Show currently active wake-up interval
|
||||
int soi = app.getSettings().SERVICE_OFF_INTERVAL.get();
|
||||
if (soi <= 90000) {
|
||||
dlg.setMessage(app.getString(R.string.gps_wake_up_timer) + ": " + Integer.toString(soi/1000) + "int_seconds");
|
||||
dlg.setMessage(app.getString(R.string.gps_wake_up_timer) + ": " + Integer.toString(soi/1000) + " " + app.getString(R.string.int_seconds));
|
||||
} else {
|
||||
dlg.setMessage(app.getString(R.string.gps_wake_up_timer) + ": " + Integer.toString(soi/1000/60) + "int_minutes");
|
||||
dlg.setMessage(app.getString(R.string.gps_wake_up_timer) + ": " + Integer.toString(soi/1000/60) + " " + app.getString(R.string.int_minutes));
|
||||
}
|
||||
|
||||
dlg.setPositiveButton(app.getString(R.string.keep_navigation_service), null);
|
||||
|
|
Loading…
Reference in a new issue