summaryrefslogtreecommitdiffstats
path: root/core/bind
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2019-10-23 08:02:21 +0200
committerGitHub <noreply@github.com>2019-10-23 08:02:21 +0200
commit4e29faaeea09be2df00596916877dcd7d2074fbf (patch)
tree98aacecde54331801ebd3bdccbf332094747a8d9 /core/bind
parentb1c6ba9b246f0831d54d8f8384b21b21dd4b6ea4 (diff)
parent008838555620261b25a4df7a814cc789ec4a4ad3 (diff)
downloadredot-engine-4e29faaeea09be2df00596916877dcd7d2074fbf.tar.gz
Merge pull request #32600 from cagdasc/3.2-auto-permission-manager
Add request defined permissions in AndroidManifest.xml
Diffstat (limited to 'core/bind')
-rw-r--r--core/bind/core_bind.cpp12
-rw-r--r--core/bind/core_bind.h2
2 files changed, 14 insertions, 0 deletions
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp
index d07ba44788..1d451b2982 100644
--- a/core/bind/core_bind.cpp
+++ b/core/bind/core_bind.cpp
@@ -1136,6 +1136,16 @@ bool _OS::request_permission(const String &p_name) {
return OS::get_singleton()->request_permission(p_name);
}
+bool _OS::request_permissions() {
+
+ return OS::get_singleton()->request_permissions();
+}
+
+Vector<String> _OS::get_granted_permissions() const {
+
+ return OS::get_singleton()->get_granted_permissions();
+}
+
_OS *_OS::singleton = NULL;
void _OS::_bind_methods() {
@@ -1319,6 +1329,8 @@ void _OS::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_power_percent_left"), &_OS::get_power_percent_left);
ClassDB::bind_method(D_METHOD("request_permission", "name"), &_OS::request_permission);
+ ClassDB::bind_method(D_METHOD("request_permissions"), &_OS::request_permissions);
+ ClassDB::bind_method(D_METHOD("get_granted_permissions"), &_OS::get_granted_permissions);
ADD_PROPERTY(PropertyInfo(Variant::STRING, "clipboard"), "set_clipboard", "get_clipboard");
ADD_PROPERTY(PropertyInfo(Variant::INT, "current_screen"), "set_current_screen", "get_current_screen");
diff --git a/core/bind/core_bind.h b/core/bind/core_bind.h
index 693b85710a..1a4fd1d5cb 100644
--- a/core/bind/core_bind.h
+++ b/core/bind/core_bind.h
@@ -349,6 +349,8 @@ public:
bool has_feature(const String &p_feature) const;
bool request_permission(const String &p_name);
+ bool request_permissions();
+ Vector<String> get_granted_permissions() const;
static _OS *get_singleton() { return singleton; }