aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Wilhelm <martin@system4.net>2017-09-07 10:43:05 +0200
committerMartin Wilhelm <martin@system4.net>2017-09-07 10:43:05 +0200
commitf64f585c904ca6f5d38414c7d2760200505bb24f (patch)
tree2acff74c979999d0fd7174404c825a2e64915d5d
parent40eaa5e26c44c3fc826bae406263443fb04e12d5 (diff)
downloadetbsa-traccar-manager-android-f64f585c904ca6f5d38414c7d2760200505bb24f.tar.gz
etbsa-traccar-manager-android-f64f585c904ca6f5d38414c7d2760200505bb24f.tar.bz2
etbsa-traccar-manager-android-f64f585c904ca6f5d38414c7d2760200505bb24f.zip
Adds a new network_security_config to allow custom CAs installed by user. This is needed for Android 7+, see https://android-developers.googleblog.com/2016/07/changes-to-trusted-certificate.html.
-rw-r--r--app/src/main/AndroidManifest.xml3
-rw-r--r--app/src/main/res/xml/network_security_config.xml9
2 files changed, 11 insertions, 1 deletions
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 79cd006..db2c290 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -9,7 +9,8 @@
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
- android:theme="@style/AppTheme">
+ android:theme="@style/AppTheme"
+ android:networkSecurityConfig=”@xml/network_security_config”>
<activity
android:name=".MainActivity"
diff --git a/app/src/main/res/xml/network_security_config.xml b/app/src/main/res/xml/network_security_config.xml
new file mode 100644
index 0000000..8a76775
--- /dev/null
+++ b/app/src/main/res/xml/network_security_config.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<network-security-config>
+ <base-config cleartextTrafficPermitted="true">
+ <trust-anchors>
+ <certificates src="system" />
+ <certificates src="user" />
+ </trust-anchors>
+ </base-config>
+</network-security-config>