diff cagou/core/platform_/base.py @ 400:71f51198478c

android: handle runtime permissions: - some mandatory permissions are requested on Cagou start, Cagou won't start at all and display a warning message if they are not granted (we request 5 times before showing the warning) - transfer plugin can now use "android_permissions" in plugin_info, to indicate what is necessary. The permissions will then be requested, and the plugin widget won't be shown if they are not granted (and a warning not will then be displayed)
author Goffi <goffi@goffi.org>
date Sun, 09 Feb 2020 23:47:29 +0100
parents 4d660b252487
children 355326a3501c
line wrap: on
line diff
--- a/cagou/core/platform_/base.py	Sun Feb 09 23:47:29 2020 +0100
+++ b/cagou/core/platform_/base.py	Sun Feb 09 23:47:29 2020 +0100
@@ -75,6 +75,10 @@
     def updateParamsExtra(self, extra):
         pass
 
+    def check_plugin_permissions(self, plug_info, callback, errback):
+        """Check that plugin permissions for this platform are granted"""
+        callback()
+
     def open_url(self, url, wid=None):
         """Open an URL in the way appropriate for the platform