(android) Fix user CA certs ignored on API24+

This commit is contained in:
Ming Ming 2021-05-08 14:54:50 +08:00
parent 5068fc8a01
commit 0d5e93072a
2 changed files with 10 additions and 1 deletions

View file

@ -11,7 +11,7 @@
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
android:name="androidx.multidex.MultiDexApplication"
android:usesCleartextTraffic="true"
android:networkSecurityConfig="@xml/network_security_config"
android:allowBackup="false">
<activity
android:name=".MainActivity"

View file

@ -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>