permit cleartext traffic on P
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Sat, 30 Nov 2019 21:26:48 +0000 (23:26 +0200)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Sat, 30 Nov 2019 21:26:48 +0000 (23:26 +0200)
clearly using https is better, but this is something outside of MoLe's
control, so let the users use whatever they want

The profile editor already warns when authorization is used over plain
http

app/src/main/AndroidManifest.xml
app/src/main/res/xml/network_security_config.xml [new file with mode: 0644]

index 35f3747..5195034 100644 (file)
@@ -15,6 +15,7 @@
   ~ along with MoLe. If not, see <https://www.gnu.org/licenses/>.
   -->
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
     package="net.ktnx.mobileledger">
 
     <uses-permission android:name="android.permission.INTERNET" />
@@ -27,7 +28,9 @@
         android:label="@string/app_name"
         android:roundIcon="@drawable/app_icon"
         android:supportsRtl="true"
-        android:theme="@style/AppTheme">
+        android:networkSecurityConfig="@xml/network_security_config"
+        android:theme="@style/AppTheme"
+        tools:ignore="GoogleAppIndexingWarning">
         <activity
             android:name=".ui.activity.MainActivity"
             android:label="@string/app_name"
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 (file)
index 0000000..223e12e
--- /dev/null
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?><!--
+  ~ Copyright © 2019 Damyan Ivanov.
+  ~ This file is part of MoLe.
+  ~ MoLe is free software: you can distribute it and/or modify it
+  ~ under the term of the GNU General Public License as published by
+  ~ the Free Software Foundation, either version 3 of the License, or
+  ~ (at your opinion), any later version.
+  ~
+  ~ MoLe is distributed in the hope that it will be useful,
+  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+  ~ GNU General Public License terms for details.
+  ~
+  ~ You should have received a copy of the GNU General Public License
+  ~ along with MoLe. If not, see <https://www.gnu.org/licenses/>.
+  -->
+
+<network-security-config>
+    <base-config cleartextTrafficPermitted="true" />
+</network-security-config>
\ No newline at end of file