Skip to content

Commit

Permalink
ANDROID: Clean up AndroidManifest.xml
Browse files Browse the repository at this point in the history
Keep uses-flags at the top to avoid them getting buried below
the activities, update target SDK to the minimum supported by
current Android SDKs, make Wi-Fi optional, and add screenSize
configuration change recommended by the Android documentation since
orientation is already supported.
  • Loading branch information
csnover committed Nov 23, 2017
1 parent 2dfa1fa commit 583c7cf
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 38 deletions.
44 changes: 25 additions & 19 deletions dists/android/AndroidManifest.xml
@@ -1,16 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- NB: android:versionCode needs to be bumped for formal releases -->

<!-- NB: android:versionCode needs to be bumped for formal releases -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.scummvm.scummvm"
android:versionCode="@ANDROID_VERSIONCODE@"
android:versionName="2.0.0git"
android:sharedUserId="org.scummvm.scummvm">

<!-- This version works on Android 1.5 (SDK 3) and newer, but we
want Android 2.2 (SDK 8) defaults and features. -->
<uses-sdk android:minSdkVersion="3"
android:targetSdkVersion="8"/>
android:targetSdkVersion="14"/>

<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

<uses-permission
android:name="android.permission.ACCESS_WIFI_STATE"/>

<uses-feature
android:name="android.hardware.wifi"
android:required="false"/>

<uses-feature
android:name="android.hardware.screen.landscape"
android:required="false"/>

<uses-feature
android:name="android.hardware.touchscreen"
android:required="false"/>

<uses-feature
android:name="android.software.leanback"
android:required="false"/>

<application
android:label="@string/app_name"
Expand All @@ -20,7 +40,7 @@
<activity android:name=".ScummVMActivity"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
android:screenOrientation="landscape"
android:configChanges="orientation|keyboardHidden"
android:configChanges="orientation|keyboardHidden|screenSize"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
Expand All @@ -37,18 +57,4 @@
</intent-filter>
</activity>
</application>

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" android:required="true"/>

<uses-feature android:name="android.hardware.screen.landscape"
android:required="false" />

<uses-feature android:name="android.hardware.touchscreen"
android:required="false" />

<uses-feature android:name="android.software.leanback"
android:required="false" />

</manifest>
44 changes: 25 additions & 19 deletions dists/android/AndroidManifest.xml.in
@@ -1,16 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- NB: android:versionCode needs to be bumped for formal releases -->

<!-- NB: android:versionCode needs to be bumped for formal releases -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.scummvm.scummvm"
android:versionCode="@ANDROID_VERSIONCODE@"
android:versionName="@VERSION@"
android:sharedUserId="org.scummvm.scummvm">

<!-- This version works on Android 1.5 (SDK 3) and newer, but we
want Android 2.2 (SDK 8) defaults and features. -->
<uses-sdk android:minSdkVersion="3"
android:targetSdkVersion="8"/>
android:targetSdkVersion="14"/>

<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

<uses-permission
android:name="android.permission.ACCESS_WIFI_STATE"/>

<uses-feature
android:name="android.hardware.wifi"
android:required="false"/>

<uses-feature
android:name="android.hardware.screen.landscape"
android:required="false"/>

<uses-feature
android:name="android.hardware.touchscreen"
android:required="false"/>

<uses-feature
android:name="android.software.leanback"
android:required="false"/>

<application
android:label="@string/app_name"
Expand All @@ -20,7 +40,7 @@
<activity android:name=".ScummVMActivity"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
android:screenOrientation="landscape"
android:configChanges="orientation|keyboardHidden"
android:configChanges="orientation|keyboardHidden|screenSize"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
Expand All @@ -37,18 +57,4 @@
</intent-filter>
</activity>
</application>

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" android:required="true"/>

<uses-feature android:name="android.hardware.screen.landscape"
android:required="false" />

<uses-feature android:name="android.hardware.touchscreen"
android:required="false" />

<uses-feature android:name="android.software.leanback"
android:required="false" />

</manifest>

0 comments on commit 583c7cf

Please sign in to comment.