[Commits] SDL: android: add screenSize to AndroidManifest's configChanges ...

libsdl.org revision control commits-owner at libsdl.org
Fri May 19 12:06:21 PDT 2017

details:   https://hg.libsdl.org/SDL/rev/1f151426c2ca
changeset: 11018:1f151426c2ca
user:      Ryan C. Gordon <icculus at icculus.org>
date:      Fri May 19 15:06:05 2017 -0400
android: add screenSize to AndroidManifest's configChanges (thanks, Daniel!).

Fixes Bugzilla #3448.

"Starting with Android API 13, another configuration change must be declared
to be handled by the app if it is desired to not let the system handle
rotation itself:


This will have effect if either a developer or SDL per default will set target
API > 12. Currently it is set to 12, but this might change in the future, like
when applying this patch: https://bugzilla.libsdl.org/show_bug.cgi?id=3445

The effect of not having this change applied is that the SDL app is destroyed
upon rotation. Even when the manifest has an additional entry to e.g. always
stay in landscape mode, the onDestroy() call will happen on devices that are
portrait per default, when switching off screen due to power save. The device
will then (at least try to) rotate into portrait to show the portrait screen
lock after resume.

I believe it is safe to apply this patch even with target API still set to 12,
the additional parameter is simply ignored."


 android-project/AndroidManifest.xml |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r 411bf9f7f908 -r 1f151426c2ca android-project/AndroidManifest.xml
--- a/android-project/AndroidManifest.xml	Fri May 19 14:51:03 2017 -0400
+++ b/android-project/AndroidManifest.xml	Fri May 19 15:06:05 2017 -0400
@@ -36,7 +36,7 @@
                  android:hardwareAccelerated="true" >
         <activity android:name="SDLActivity"
-                  android:configChanges="keyboardHidden|orientation"
+                  android:configChanges="keyboardHidden|orientation|screenSize"
                 <action android:name="android.intent.action.MAIN" />

More information about the commits mailing list