Forráskód Böngészése

Update Android app configuration

- Added uses-feature flags in line with SDL app. Hopefully this should:
  - fix handling of right mouse button
  - make VCMI available on TV's running Android - these devices don't
have touchscreen feature, which is added as required by default
- Unified AndroidManifest formatting - was mix of tabs & spaces
Ivan Savenko 5 hónapja
szülő
commit
7e692f1d6d
1 módosított fájl, 42 hozzáadás és 30 törlés
  1. 42 30
      android/AndroidManifest.xml

+ 42 - 30
android/AndroidManifest.xml

@@ -1,30 +1,42 @@
 <?xml version="1.0" encoding="utf-8"?>
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="eu.vcmi.vcmi">
+	package="eu.vcmi.vcmi">
 
-    <uses-permission android:name="android.permission.INTERNET" />
-    <uses-permission android:name="android.permission.VIBRATE" />
-    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
+	<uses-permission android:name="android.permission.INTERNET" />
+	<uses-permission android:name="android.permission.VIBRATE" />
+	<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
+	
+	<!-- Touchscreen support -->
+	<uses-feature android:name="android.hardware.touchscreen" android:required="false" />
+
+	<!-- Game controller support -->
+	<uses-feature android:name="android.hardware.bluetooth" android:required="false" />
+	<uses-feature android:name="android.hardware.gamepad" android:required="false" />
+	<uses-feature android:name="android.hardware.usb.host" android:required="false" />
+
+	<!-- External mouse input events -->
+	<uses-feature android:name="android.hardware.type.pc" android:required="false" />
 
 	<supports-screens
-        android:largeScreens="true"
-        android:xlargeScreens="true" />
-    <application
-        android:name="org.qtproject.qt5.android.bindings.QtApplication"
-        android:hardwareAccelerated="true"
-        android:hasFragileUserData="true"
-        android:allowBackup="false"
-        android:installLocation="auto"
-        android:icon="@mipmap/ic_launcher"
-        android:label="${applicationLabel}"
-        android:testOnly="false"
-        android:supportsRtl="true"
-        android:usesCleartextTraffic="false">
+		android:largeScreens="true"
+		android:xlargeScreens="true" />
+
+	<application
+		android:name="org.qtproject.qt5.android.bindings.QtApplication"
+		android:hardwareAccelerated="true"
+		android:hasFragileUserData="true"
+		android:allowBackup="false"
+		android:installLocation="auto"
+		android:icon="@mipmap/ic_launcher"
+		android:label="${applicationLabel}"
+		android:testOnly="false"
+		android:supportsRtl="true"
+		android:usesCleartextTraffic="false">
 		<activity
 			android:name=".ActivityLauncher"
 			android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|layoutDirection|locale|fontScale|keyboard|keyboardHidden|navigation|mcc|mnc|density"
 			android:exported="true"
-            android:screenOrientation="sensorLandscape">
+			android:screenOrientation="sensorLandscape">
 			<intent-filter>
 				<action android:name="android.intent.action.MAIN"/>
 				<category android:name="android.intent.category.LAUNCHER"/>
@@ -76,18 +88,18 @@
 			<!-- extract android style -->
 		</activity>
 
-        <activity
-            android:name=".VcmiSDLActivity"
-            android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|layoutDirection|locale|fontScale|keyboard|keyboardHidden|navigation|mcc|mnc|density"
-            android:label="@string/app_name"
-            android:launchMode="singleTop"
-            android:screenOrientation="fullSensor" />
+		<activity
+			android:name=".VcmiSDLActivity"
+			android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|layoutDirection|locale|fontScale|keyboard|keyboardHidden|navigation|mcc|mnc|density"
+			android:label="@string/app_name"
+			android:launchMode="singleTop"
+			android:screenOrientation="fullSensor" />
 
-        <service
-            android:name=".ServerService"
-            android:process="eu.vcmi.vcmi.srv"
-            android:description="@string/server_name"
-            android:exported="false"/>
-    </application>
+		<service
+			android:name=".ServerService"
+			android:process="eu.vcmi.vcmi.srv"
+			android:description="@string/server_name"
+			android:exported="false"/>
+	</application>
 
 </manifest>