Show notification
This commit is contained in:
parent
653995556f
commit
59ad93d445
4 changed files with 10 additions and 5 deletions
|
@ -62,7 +62,6 @@ public class NotificationHelper {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
app.registerReceiver(stopBroadcastReceiver, new IntentFilter(OSMAND_STOP_GPX_SERVICE_ACTION));
|
app.registerReceiver(stopBroadcastReceiver, new IntentFilter(OSMAND_STOP_GPX_SERVICE_ACTION));
|
||||||
showNotification();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Builder buildNotificationInStatusBar() {
|
public Builder buildNotificationInStatusBar() {
|
||||||
|
|
|
@ -640,6 +640,7 @@ public class MapActivity extends AccessibleActivity {
|
||||||
protected void onStart() {
|
protected void onStart() {
|
||||||
super.onStart();
|
super.onStart();
|
||||||
wakeLockHelper.onStart(this);
|
wakeLockHelper.onStart(this);
|
||||||
|
getMyApplication().getNotificationHelper().showNotification();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void setProgressDlg(Dialog progressDlg) {
|
protected void setProgressDlg(Dialog progressDlg) {
|
||||||
|
@ -670,10 +671,14 @@ public class MapActivity extends AccessibleActivity {
|
||||||
getMyApplication().unsubscribeInitListener(initListener);
|
getMyApplication().unsubscribeInitListener(initListener);
|
||||||
mapViewTrackingUtilities.setMapView(null);
|
mapViewTrackingUtilities.setMapView(null);
|
||||||
cancelNotification();
|
cancelNotification();
|
||||||
|
if(getMyApplication().getNavigationService() == null) {
|
||||||
|
getMyApplication().getNotificationHelper().removeServiceNotification();
|
||||||
|
}
|
||||||
app.getResourceManager().getMapTileDownloader().removeDownloaderCallback(mapView);
|
app.getResourceManager().getMapTileDownloader().removeDownloaderCallback(mapView);
|
||||||
if (atlasMapRendererView != null) {
|
if (atlasMapRendererView != null) {
|
||||||
atlasMapRendererView.handleOnDestroy();
|
atlasMapRendererView.handleOnDestroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void cancelNotification() {
|
private void cancelNotification() {
|
||||||
|
|
|
@ -454,9 +454,10 @@ public class SettingsGeneralActivity extends SettingsBaseActivity {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
Intent intent = getIntent();
|
android.os.Process.killProcess(android.os.Process.myPid());
|
||||||
finish();
|
// Intent intent = getIntent();
|
||||||
startActivity(intent);
|
// finish();
|
||||||
|
// startActivity(intent);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
bld.show();
|
bld.show();
|
||||||
|
|
Loading…
Reference in a new issue