diff --git a/OsmAnd/src/net/osmand/plus/NotificationHelper.java b/OsmAnd/src/net/osmand/plus/NotificationHelper.java index 989e03b69d..a682c07e35 100644 --- a/OsmAnd/src/net/osmand/plus/NotificationHelper.java +++ b/OsmAnd/src/net/osmand/plus/NotificationHelper.java @@ -62,7 +62,6 @@ public class NotificationHelper { } }; app.registerReceiver(stopBroadcastReceiver, new IntentFilter(OSMAND_STOP_GPX_SERVICE_ACTION)); - showNotification(); } public Builder buildNotificationInStatusBar() { diff --git a/OsmAnd/src/net/osmand/plus/OsmandApplication.java b/OsmAnd/src/net/osmand/plus/OsmandApplication.java index 06097b9437..57cb57aa1a 100644 --- a/OsmAnd/src/net/osmand/plus/OsmandApplication.java +++ b/OsmAnd/src/net/osmand/plus/OsmandApplication.java @@ -166,7 +166,7 @@ public class OsmandApplication extends Application { public IconsCache getIconsCache() { return iconsCache; } - + @Override public void onTerminate() { super.onTerminate(); diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java index e2e5bc422e..f141976b03 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java @@ -640,6 +640,7 @@ public class MapActivity extends AccessibleActivity { protected void onStart() { super.onStart(); wakeLockHelper.onStart(this); + getMyApplication().getNotificationHelper().showNotification(); } protected void setProgressDlg(Dialog progressDlg) { @@ -670,10 +671,14 @@ public class MapActivity extends AccessibleActivity { getMyApplication().unsubscribeInitListener(initListener); mapViewTrackingUtilities.setMapView(null); cancelNotification(); + if(getMyApplication().getNavigationService() == null) { + getMyApplication().getNotificationHelper().removeServiceNotification(); + } app.getResourceManager().getMapTileDownloader().removeDownloaderCallback(mapView); if (atlasMapRendererView != null) { atlasMapRendererView.handleOnDestroy(); } + } private void cancelNotification() { diff --git a/OsmAnd/src/net/osmand/plus/activities/SettingsGeneralActivity.java b/OsmAnd/src/net/osmand/plus/activities/SettingsGeneralActivity.java index 0d71de4f23..ab18465216 100644 --- a/OsmAnd/src/net/osmand/plus/activities/SettingsGeneralActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/SettingsGeneralActivity.java @@ -454,9 +454,10 @@ public class SettingsGeneralActivity extends SettingsBaseActivity { @Override public void onClick(DialogInterface dialog, int which) { - Intent intent = getIntent(); - finish(); - startActivity(intent); + android.os.Process.killProcess(android.os.Process.myPid()); +// Intent intent = getIntent(); +// finish(); +// startActivity(intent); } }); bld.show();