comparison 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
comparison
equal deleted inserted replaced
371:080b6cc17f53 372:1481f09c9175
131 131
132 def on_key_back_share(self, share_widget): 132 def on_key_back_share(self, share_widget):
133 share_widget.close() 133 share_widget.close()
134 PythonActivity.moveTaskToBack(True) 134 PythonActivity.moveTaskToBack(True)
135 return True 135 return True
136
137 def updateParamsExtra(self, extra):
138 # on Android, we handle autoconnection automatically,
139 # user must not modify those parameters
140 extra.update(
141 {
142 "ignore": [
143 ["Connection", "autoconnect_backend"],
144 ["Connection", "autoconnect"],
145 ["Connection", "autodisconnect"],
146 ],
147 }
148 )
136 149
137 def getPathFromUri(self, uri): 150 def getPathFromUri(self, uri):
138 cursor = mActivity.getContentResolver().query(uri, None, None, None, None) 151 cursor = mActivity.getContentResolver().query(uri, None, None, None, None)
139 if cursor is None: 152 if cursor is None:
140 return uri.getPath() 153 return uri.getPath()