diff cagou/core/platform_/android.py @ 372:1481f09c9175

settings (android): don't expose autoconnect parameters: autoconnection parameters are used on Android to reconnect automatically any profile connected, so we use the new `extra` parameter to ignore them, avoiding an accidental change by the user which would be confusing.
author Goffi <goffi@goffi.org>
date Mon, 27 Jan 2020 21:17:08 +0100
parents 1a12bbd80943
children 5d994be1161b
line wrap: on
line diff
--- a/cagou/core/platform_/android.py	Mon Jan 27 21:17:08 2020 +0100
+++ b/cagou/core/platform_/android.py	Mon Jan 27 21:17:08 2020 +0100
@@ -134,6 +134,19 @@
         PythonActivity.moveTaskToBack(True)
         return True
 
+    def updateParamsExtra(self, extra):
+        # on Android, we handle autoconnection automatically,
+        # user must not modify those parameters
+        extra.update(
+            {
+                "ignore": [
+                    ["Connection", "autoconnect_backend"],
+                    ["Connection", "autoconnect"],
+                    ["Connection", "autodisconnect"],
+                ],
+            }
+        )
+
     def getPathFromUri(self, uri):
         cursor = mActivity.getContentResolver().query(uri, None, None, None, None)
         if cursor is None: