code: public void enableRendering(boolean flag) {
          if (flag) {
              egl.eglMakeCurrent(eglDisplay, eglSurface, eglSurface,
                                         eglContext);
          } else {
              egl.eglMakeCurrent(eglDisplay, 0, 0, eglContext);
          }
      }
docs: Make the EGL drawing surface current or not
  
  @param flag