public void onResume() { Gdx.app = this; Gdx.input = input; Gdx.audio = audio; Gdx.files = files; Gdx.graphics = graphics; input.registerSensorListeners(); // FIXME restore conditional execution if lifecycle errors will occur when GLSurfaceView used. // GLSurfaceView is guaranteed to work with this condition on, but GLSurfaceViewCupcake requires // it off, // so I disabled it. // if (!firstResume) // mentioned condition if (graphics != null && graphics.view != null) { if (graphics.view instanceof GLSurfaceViewAPI18) ((GLSurfaceViewAPI18) graphics.view).onResume(); else if (graphics.view instanceof GLSurfaceView) ((GLSurfaceView) graphics.view).onResume(); else throw new RuntimeException("unimplemented"); } if (!firstResume) { audio.resume(); graphics.resume(); } else firstResume = false; }
public void onResume() { registerSensorListeners(); }