mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-21 13:53:37 +00:00
Fix IllegalStateException in destroySurface method
Signed-off-by: DevarshVasani <vasanidevarsh@gmail.com>
This commit is contained in:
committed by
Konstantin Pastbin
parent
05c4413394
commit
8d95d2e9b7
@@ -41,9 +41,9 @@ public class MapFragment extends BaseMwmFragment implements View.OnTouchListener
|
||||
mMap.updateMyPositionRoutingOffset(offsetY);
|
||||
}
|
||||
|
||||
public void destroySurface()
|
||||
public void destroySurface(boolean activityIsChangingConfigurations)
|
||||
{
|
||||
mMap.onSurfaceDestroyed(requireActivity().isChangingConfigurations(), isAdded());
|
||||
mMap.onSurfaceDestroyed(activityIsChangingConfigurations, isAdded());
|
||||
}
|
||||
|
||||
public boolean isContextCreated()
|
||||
|
||||
@@ -1303,7 +1303,7 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
||||
{
|
||||
// Explicitly destroy surface before activity recreation.
|
||||
if (mMapFragment != null)
|
||||
mMapFragment.destroySurface();
|
||||
mMapFragment.destroySurface(true);
|
||||
super.recreate();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user