Add check for fragments over map
This commit is contained in:
parent
a60a85d156
commit
5b4420eb42
1 changed files with 7 additions and 1 deletions
|
@ -1120,7 +1120,13 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isMapVisible() {
|
public boolean isMapVisible() {
|
||||||
return AndroidUtils.isActivityNotDestroyed(this) && settings.MAP_ACTIVITY_ENABLED.get();
|
for (Fragment fragment : getSupportFragmentManager().getFragments()) {
|
||||||
|
if (fragment.isVisible()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return AndroidUtils.isActivityNotDestroyed(this) && settings.MAP_ACTIVITY_ENABLED.get()
|
||||||
|
&& !dashboardOnMap.isVisible();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void restartApp() {
|
private void restartApp() {
|
||||||
|
|
Loading…
Reference in a new issue