Mercurial > libervia-desktop-kivy
comparison cagou/core/platform_/android.py @ 427:b51c10cc7325
android: fixed "check_plugin_permissions" when no permission is requested
author | Goffi <goffi@goffi.org> |
---|---|
date | Sun, 01 Mar 2020 22:11:25 +0100 |
parents | c466678c57b2 |
children | 85fc3da9560c |
comparison
equal
deleted
inserted
replaced
426:d3a6ae859556 | 427:b51c10cc7325 |
---|---|
439 | 439 |
440 def check_plugin_permissions(self, plug_info, callback, errback): | 440 def check_plugin_permissions(self, plug_info, callback, errback): |
441 perms = plug_info.get("android_permissons") | 441 perms = plug_info.get("android_permissons") |
442 if not perms: | 442 if not perms: |
443 callback() | 443 callback() |
444 return | |
444 perms = [f"android.permission.{p}" if '.' not in p else p for p in perms] | 445 perms = [f"android.permission.{p}" if '.' not in p else p for p in perms] |
445 | 446 |
446 def request_permissions_cb(permissions, granted): | 447 def request_permissions_cb(permissions, granted): |
447 if all(granted): | 448 if all(granted): |
448 Clock.schedule_once(lambda *args: callback()) | 449 Clock.schedule_once(lambda *args: callback()) |