* Stopped Android version from completely destroying/recreating SDLActivity when the device is locked.

Fixes multiple identical issue entries in tracker:
issue 696 (was marked fixed then restarted)
issue 876, issue 886, issue 894
This commit is contained in:
rolzad73@gmail.com
2012-08-19 16:19:56 +00:00
parent 4c74ae06fd
commit 6d4e677711
2 changed files with 10 additions and 2 deletions

View File

@@ -23,6 +23,7 @@ import android.content.Context;
import android.content.DialogInterface;
import android.content.SharedPreferences;
import android.content.pm.PackageManager.NameNotFoundException;
import android.content.res.Configuration;
import android.graphics.Canvas;
import android.graphics.PixelFormat;
import android.hardware.Sensor;
@@ -788,6 +789,13 @@ public class SDLActivity extends Activity implements OnKeyListener{
}
return "0" + v;
}
// Empty onConfigurationChanged to stop the Activity from destroying/recreating on screen off
@Override
public void onConfigurationChanged(Configuration newConfig)
{
super.onConfigurationChanged(newConfig);
}
}
/**