Fix IllegalStateException in destroySurface method

Signed-off-by: DevarshVasani <vasanidevarsh@gmail.com>
This commit is contained in:
DevarshVasani
2025-03-05 17:24:30 +05:30
committed by Konstantin Pastbin
parent 05c4413394
commit 8d95d2e9b7
2 changed files with 3 additions and 3 deletions

View File

@@ -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()

View File

@@ -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();
}