summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--android/src/main/AndroidManifest.xml45
-rw-r--r--ci/ci-android-xml.sh18
2 files changed, 26 insertions, 37 deletions
diff --git a/android/src/main/AndroidManifest.xml b/android/src/main/AndroidManifest.xml
index ca8178220b..8b55f36bf5 100644
--- a/android/src/main/AndroidManifest.xml
+++ b/android/src/main/AndroidManifest.xml
@@ -1,42 +1,31 @@
-<manifest
- xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- package="net.mullvad.mullvadvpn"
- >
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
+ package="net.mullvad.mullvadvpn">
<permission android:name="net.mullvad.mullvadvpn.permission.TUNNEL_ACTION"
- android:protectionLevel="signature"
- />
-
+ android:protectionLevel="signature" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="net.mullvad.mullvadvpn.permission.TUNNEL_ACTION" />
-
- <application
- android:label="@string/app_name"
- android:icon="@mipmap/ic_launcher"
- android:roundIcon="@mipmap/ic_launcher"
- android:theme="@style/AppTheme"
- android:allowBackup="false"
- tools:ignore="GoogleAppIndexingWarning"
- >
- <activity
- android:name="net.mullvad.mullvadvpn.ui.MainActivity"
- android:label="@string/app_name"
- android:configChanges="orientation"
- android:screenOrientation="portrait"
- android:windowSoftInputMode="adjustPan"
- >
+ <application android:label="@string/app_name"
+ android:icon="@mipmap/ic_launcher"
+ android:roundIcon="@mipmap/ic_launcher"
+ android:theme="@style/AppTheme"
+ android:allowBackup="false"
+ tools:ignore="GoogleAppIndexingWarning">
+ <activity android:name="net.mullvad.mullvadvpn.ui.MainActivity"
+ android:label="@string/app_name"
+ android:configChanges="orientation"
+ android:screenOrientation="portrait"
+ android:windowSoftInputMode="adjustPan">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
+ <service android:name="net.mullvad.mullvadvpn.service.MullvadVpnService"
+ android:permission="android.permission.BIND_VPN_SERVICE">
- <service
- android:name="net.mullvad.mullvadvpn.service.MullvadVpnService"
- android:permission="android.permission.BIND_VPN_SERVICE"
- >
<intent-filter>
<action android:name="android.net.VpnService" />
</intent-filter>
diff --git a/ci/ci-android-xml.sh b/ci/ci-android-xml.sh
index 6ebf27672f..96dd2d27cb 100644
--- a/ci/ci-android-xml.sh
+++ b/ci/ci-android-xml.sh
@@ -4,7 +4,6 @@
# Autoformats Android XML files
function tidy-up-android-xml {
-
tidy -xml \
-m \
-i \
@@ -12,20 +11,21 @@ function tidy-up-android-xml {
--indent-attributes yes \
--indent-spaces 4 \
--literal-attributes yes \
- android/src/main/res/*/*.xml
+ android/src/main/AndroidManifest.xml android/src/main/res/*/*.xml
+
# FIXME - when tidy learns to not leave whitespace around, remove the line below - https://github.com/htacg/tidy-html5/issues/864
- find android/src/main/res/ -name '*.xml' -exec sed -i -e 's/[ \t]*$//' '{}' ';'
+ find android/src/main/ -name '*.xml' -exec sed -i -e 's/[ \t]*$//' '{}' ';'
}
# Autoformats Android XML files and returns 0 if no files were actually changed, or 1 if files were changed
function tidy-verify-xml {
tidy-up-android-xml
- if (( $(git diff android/src/main/res/ | wc -l) > 0 )); then
- echo "android/src/main/res contains that were changed, XML is not formatted properly"
- git diff android/src/main/res/
- return 1;
- else
+
+ if git diff --exit-code -- android/src/main/AndroidManifest.xml android/src/main/res; then
echo "Android XML files are correctly formatted"
- return 0;
+ return 0
+ else
+ echo "android/src/main contains files that were changed, XML is not formatted properly"
+ return 1
fi
}