Improve GLSurfaceView Pausing.

When pausing we want to do three separate things, in order:

 + release the EGL surface
 + optionally release the EGL context
 + optionally terminate Egl

Previously we would only do these things if we had an EGL surface. But
it is possible that we don't have an EGL Surface, but still have an EGL
context. And in that situation we still want to release the EGL context.

Now we check the preconditions for the three cases separately.

Bug: 6338235
Change-Id: I804683b3d5c136cc98ea3f5051067eea18152ddf
1 file changed