From cbd1905d69994f2265260dc0b83588bce296e5f4 Mon Sep 17 00:00:00 2001 From: mittorn Date: Sun, 14 Feb 2016 19:39:21 +0000 Subject: [PATCH] Disable exiting onDestroy as android may kill process while saving config --- src/org/libsdl/app/SDLActivity.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/org/libsdl/app/SDLActivity.java b/src/org/libsdl/app/SDLActivity.java index 43a4e0a8..dc77719f 100644 --- a/src/org/libsdl/app/SDLActivity.java +++ b/src/org/libsdl/app/SDLActivity.java @@ -318,7 +318,12 @@ public class SDLActivity extends Activity { @Override protected void onDestroy() { Log.v("SDL", "onDestroy()"); - + /* Stupid android bug: android calles onDestroy + and kills process while engine is writing config. + it results in configuration loss, so we preferred to disable it + */ + return; + /* if( mVibrator != null ) mVibrator.cancel(); if (SDLActivity.mBrokenLibraries) { @@ -347,6 +352,7 @@ public class SDLActivity extends Activity { super.onDestroy(); // Reset everything in case the user re opens the app SDLActivity.initialize(); + */ } @Override