From 77e4a5250fc6df451999efe508f57968a44b603f Mon Sep 17 00:00:00 2001 From: John Reck Date: Wed, 1 Oct 2014 10:38:07 -0700 Subject: Re-allow suppressing onDetachedFromWindow Bug: 17578553 Games seem to be doing this to prevent destruction of their GL contexts, and they assume it works even if it doesn't. However, GLSurfaceView is clunky here, so while the app is doing something questionable we don't really offer a better way. For now revert back to kitkat behavior. Change-Id: Icfa9e496279b9cfa47f9bc7f6848d9313caed0d5 --- opengl/java/android/opengl/GLSurfaceView.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'opengl/java/android') diff --git a/opengl/java/android/opengl/GLSurfaceView.java b/opengl/java/android/opengl/GLSurfaceView.java index 1406f6b..3c76115 100644 --- a/opengl/java/android/opengl/GLSurfaceView.java +++ b/opengl/java/android/opengl/GLSurfaceView.java @@ -595,9 +595,8 @@ public class GLSurfaceView extends SurfaceView implements SurfaceHolder.Callback mDetached = false; } - /** @hide */ @Override - protected void onDetachedFromWindowInternal() { + protected void onDetachedFromWindow() { if (LOG_ATTACH_DETACH) { Log.d(TAG, "onDetachedFromWindow"); } @@ -605,7 +604,7 @@ public class GLSurfaceView extends SurfaceView implements SurfaceHolder.Callback mGLThread.requestExitAndWait(); } mDetached = true; - super.onDetachedFromWindowInternal(); + super.onDetachedFromWindow(); } // ---------------------------------------------------------------------- -- cgit v1.1