1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Projucer (Android): Avoid setting orientation key when unspecified by user

This commit is contained in:
reuk 2025-04-29 20:25:03 +01:00
parent 5e44c34377
commit f30d70049c
No known key found for this signature in database
5 changed files with 9 additions and 14 deletions

View file

@ -24,8 +24,7 @@
<application android:label="@string/app_name" android:name="com.rmsl.juce.JuceApp" android:icon="@drawable/icon" android:hardwareAccelerated="false">
<receiver android:name="com.rmsl.juce.Receiver" android:exported="false"/>
<activity android:name="com.rmsl.juce.JuceActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenSize|navigation|smallestScreenSize|screenLayout"
android:screenOrientation="unspecified" android:launchMode="singleTask" android:hardwareAccelerated="true"
android:exported="true">
android:launchMode="singleTask" android:hardwareAccelerated="true" android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>

View file

@ -14,8 +14,7 @@
<application android:label="@string/app_name" android:name="com.rmsl.juce.JuceApp" android:hardwareAccelerated="false">
<receiver android:name="com.rmsl.juce.Receiver" android:exported="false"/>
<activity android:name="com.rmsl.juce.JuceActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenSize|navigation|smallestScreenSize|screenLayout"
android:screenOrientation="unspecified" android:launchMode="singleTask" android:hardwareAccelerated="true"
android:exported="true">
android:launchMode="singleTask" android:hardwareAccelerated="true" android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>

View file

@ -23,8 +23,7 @@
<application android:label="@string/app_name" android:name="com.rmsl.juce.JuceApp" android:icon="@drawable/icon" android:hardwareAccelerated="false">
<receiver android:name="com.rmsl.juce.Receiver" android:exported="false"/>
<activity android:name="com.rmsl.juce.JuceActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenSize|navigation|smallestScreenSize|screenLayout"
android:screenOrientation="unspecified" android:launchMode="singleTask" android:hardwareAccelerated="true"
android:exported="true">
android:launchMode="singleTask" android:hardwareAccelerated="true" android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>

View file

@ -15,8 +15,7 @@
<application android:label="@string/app_name" android:name="com.rmsl.juce.JuceApp" android:icon="@drawable/icon" android:hardwareAccelerated="false">
<receiver android:name="com.rmsl.juce.Receiver" android:exported="false"/>
<activity android:name="com.rmsl.juce.JuceActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenSize|navigation|smallestScreenSize|screenLayout"
android:screenOrientation="unspecified" android:launchMode="singleTask" android:hardwareAccelerated="true"
android:exported="true">
android:launchMode="singleTask" android:hardwareAccelerated="true" android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>

View file

@ -1848,13 +1848,12 @@ private:
if (! act->hasAttribute ("android:configChanges"))
act->setAttribute ("android:configChanges", "keyboard|keyboardHidden|orientation|screenSize|navigation|smallestScreenSize|screenLayout");
if (androidScreenOrientation.get() == "landscape")
if (androidScreenOrientation.get() != "unspecified")
{
setAttributeIfNotPresent (*act, "android:screenOrientation", "userLandscape");
}
else
{
setAttributeIfNotPresent (*act, "android:screenOrientation", androidScreenOrientation.get());
setAttributeIfNotPresent (*act,
"android:screenOrientation",
androidScreenOrientation.get() == "landscape" ? "userLandscape"
: androidScreenOrientation.get());
}
setAttributeIfNotPresent (*act, "android:launchMode", "singleTask");