Fix customization

This commit is contained in:
crimean 2018-11-10 16:42:17 +03:00
parent 1501e447d1
commit dd074b5c2f
2 changed files with 3 additions and 2 deletions

View file

@ -190,9 +190,11 @@ public class OsmandAidlApi {
registerMuteNavigationReceiver(mapActivity);
registerUnmuteNavigationReceiver(mapActivity);
initOsmandTelegram();
app.getAppCustomization().addListener(mapActivity);
}
public void onDestroyMapActivity(MapActivity mapActivity) {
app.getAppCustomization().removeListener(mapActivity);
mapActivityActive = false;
for (BroadcastReceiver b : receivers.values()) {
if(b == null) {

View file

@ -209,7 +209,7 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven
private boolean pendingPause = false;
private Timer splashScreenTimer;
private boolean activityRestartNeeded = false;
private boolean stopped = false;
private boolean stopped = true;
private ExecutorService singleThreadExecutor = Executors.newSingleThreadExecutor();
@ -328,7 +328,6 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven
registerReceiver(screenOffReceiver, filter);
app.getAidlApi().onCreateMapActivity(this);
app.getAppCustomization().addListener(this);
mIsDestroyed = false;
}