android SurfaceViewRenderer invalid Sharecontext

Solution for android SurfaceViewRenderer invalid Sharecontext
is Given Below:

i have a group call screen using SurfaceViewRenderer to display webrtc video.
First time im create EglBase when app started ( Application class OnCreate)

MeetingClient.init(instance)

public class MeetingClient {

    private static volatile MeetingClient meetingClient;
    private final MeetingService meetingService;
    public static EglBase mRootEglBase;

   public static void init(Context context) {
        mRootEglBase = EglBase.create();
   }
...
}
 

in this call screen, im init the SurfaceViewRenderer like this:

 initRenderer(local_render, MeetingClient.mRootEglBase.eglBaseContext)
 initRenderer(main_render, MeetingClient.mRootEglBase.eglBaseContext)

private fun initRenderer(renderer: SurfaceViewRenderer, baseContext: EglBase.Context) {
        renderer.init(baseContext, object :
            RendererCommon.RendererEvents {
            override fun onFirstFrameRendered() {

            }

            override fun onFrameResolutionChanged(width: Int, height: Int, rotation: Int) {
//                Log.e(TAG, "onFrameResolutionChanged: $width - $height - $rotation ${if(renderer == local_render) "local render" else "main renderer"}")
                if (renderer == local_render) {
                    runOnUiThread { local_render.bringToFront() }
                }
            }
        })
        renderer.setMirror(false)
        renderer.setEnableHardwareScaler(true)
        renderer.setScalingType(RendererCommon.ScalingType.SCALE_ASPECT_FIT)
    }

the first time open call screen, the localVideo and remoteVideo work normally, but when i closed this activity, then open again to join group call again, i got crash and this log:

  Caused by: java.lang.RuntimeException: java.lang.RuntimeException: Invalid sharedContext
        at org.webrtc.EglBase14.createEglContext(EglBase14.java:263)
        at org.webrtc.EglBase14.<init>(EglBase14.java:71)
        at org.webrtc.EglBase.create(EglBase.java:91)
        at org.webrtc.EglRenderer.lambda$init$0$EglRenderer(EglRenderer.java:190)
        at org.webrtc.-$$Lambda$EglRenderer$miQc1-F9Qqw0EkFhtMh5sNQ-7uU.run(Unknown Source:6)

Can someone help me know this problem? Thanks