fix(android): Fix surface changed ANR (#4439)

This commit is contained in:
Adrian Cojocaru
2026-07-29 20:23:35 +03:00
committed by GitHub
parent a6189feecb
commit c8dad00be5
2 changed files with 6 additions and 1 deletions

View File

@@ -488,7 +488,7 @@ public abstract class MapLibreSurfaceView extends SurfaceView implements Surface
protected boolean requestPaused;
protected boolean paused;
protected boolean hasSurface;
protected boolean waitingForSurface;
protected boolean waitingForSurface = true;
protected int width;
protected int height;
protected MapRenderer.RenderingRefreshMode renderMode;

View File

@@ -162,6 +162,11 @@ public class MapLibreVulkanSurfaceView extends MapLibreSurfaceView {
}
}
@Override
public boolean ableToDraw() {
return graphicsSurfaceCreated && readyToDraw();
}
private boolean graphicsSurfaceCreated;
private final WeakReference<MapLibreVulkanSurfaceView> mSurfaceViewWeakRef;