From 8516fe0358805e8549a96cde785dfa7ac2576e87 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Thu, 23 Aug 2012 21:09:23 +0200 Subject: Fix Android Power-suspend and Power-resume NewtBaseActivity onPause()/onResume(): add setVisible(..) allowing recreation and avoid usage of unavail resources - crucial for power suspend/resume, which itself calls activity onPause()/onResume(), this ensures resources are not used onPause(). - Animator suspend is not sufficient due to surfaceRedrawNeeded(..) hook etc .. - iff power suspend leads to surfaceDestroyed(..), recreation is now possible due to setVisible(true) on onResume() even though I have not observed this on Android 2.3 and 4.0.1 Tested on Android 2.3 and Android 4.0.1 --- .../jogamp/opengl/test/android/NEWTGearsES2ActivityLauncher.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/test') diff --git a/src/test/com/jogamp/opengl/test/android/NEWTGearsES2ActivityLauncher.java b/src/test/com/jogamp/opengl/test/android/NEWTGearsES2ActivityLauncher.java index 907be5092..415efc7f2 100644 --- a/src/test/com/jogamp/opengl/test/android/NEWTGearsES2ActivityLauncher.java +++ b/src/test/com/jogamp/opengl/test/android/NEWTGearsES2ActivityLauncher.java @@ -53,10 +53,10 @@ public class NEWTGearsES2ActivityLauncher extends LauncherUtil.BaseActivityLaunc props.setProperty("jogl.debug.GLContext", "true"); props.setProperty("jogl.debug.GLSLCode", "true"); // props.setProperty("jogl.debug.CapabilitiesChooser", "true"); - // properties.setProperty("jogl.debug.GLSLState", "true"); - // properties.setProperty("jogl.debug.DebugGL", "true"); - // properties.setProperty("jogl.debug.TraceGL", "true"); - // properties.setProperty("newt.debug", "all"); + // props.setProperty("jogl.debug.GLSLState", "true"); + // props.setProperty("jogl.debug.DebugGL", "true"); + // props.setProperty("jogl.debug.TraceGL", "true"); + // props.setProperty("newt.debug", "all"); // props.setProperty("newt.debug.Window", "true"); // props.setProperty("newt.debug.Window.MouseEvent", "true"); props.setProperty("newt.debug.Window.KeyEvent", "true"); -- cgit v1.2.3