mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-22 06:03:45 +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);
|
mMap.updateMyPositionRoutingOffset(offsetY);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void destroySurface()
|
public void destroySurface(boolean activityIsChangingConfigurations)
|
||||||
{
|
{
|
||||||
mMap.onSurfaceDestroyed(requireActivity().isChangingConfigurations(), isAdded());
|
mMap.onSurfaceDestroyed(activityIsChangingConfigurations, isAdded());
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isContextCreated()
|
public boolean isContextCreated()
|
||||||
|
|||||||
@@ -1303,7 +1303,7 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
|||||||
{
|
{
|
||||||
// Explicitly destroy surface before activity recreation.
|
// Explicitly destroy surface before activity recreation.
|
||||||
if (mMapFragment != null)
|
if (mMapFragment != null)
|
||||||
mMapFragment.destroySurface();
|
mMapFragment.destroySurface(true);
|
||||||
super.recreate();
|
super.recreate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user