summaryrefslogtreecommitdiff
path: root/platform/android/api
diff options
context:
space:
mode:
Diffstat (limited to 'platform/android/api')
-rw-r--r--platform/android/api/api.cpp8
-rw-r--r--platform/android/api/api.h4
-rw-r--r--platform/android/api/java_class_wrapper.h8
-rw-r--r--platform/android/api/jni_singleton.h32
4 files changed, 27 insertions, 25 deletions
diff --git a/platform/android/api/api.cpp b/platform/android/api/api.cpp
index 03355e4815..f80f1e3051 100644
--- a/platform/android/api/api.cpp
+++ b/platform/android/api/api.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
+/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -64,14 +64,14 @@ void JavaClassWrapper::_bind_methods() {
#if !defined(ANDROID_ENABLED)
-Variant JavaClass::call(const StringName &, const Variant **, int, Callable::CallError &) {
+Variant JavaClass::callp(const StringName &, const Variant **, int, Callable::CallError &) {
return Variant();
}
JavaClass::JavaClass() {
}
-Variant JavaObject::call(const StringName &, const Variant **, int, Callable::CallError &) {
+Variant JavaObject::callp(const StringName &, const Variant **, int, Callable::CallError &) {
return Variant();
}
diff --git a/platform/android/api/api.h b/platform/android/api/api.h
index fe3a6734ac..a4ee27cf81 100644
--- a/platform/android/api/api.h
+++ b/platform/android/api/api.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
+/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/platform/android/api/java_class_wrapper.h b/platform/android/api/java_class_wrapper.h
index ff7bf43573..96b7b48e48 100644
--- a/platform/android/api/java_class_wrapper.h
+++ b/platform/android/api/java_class_wrapper.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
+/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -179,7 +179,7 @@ class JavaClass : public RefCounted {
#endif
public:
- virtual Variant call(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error) override;
+ virtual Variant callp(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error) override;
JavaClass();
};
@@ -195,7 +195,7 @@ class JavaObject : public RefCounted {
#endif
public:
- virtual Variant call(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error) override;
+ virtual Variant callp(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error) override;
#ifdef ANDROID_ENABLED
JavaObject(const Ref<JavaClass> &p_base, jobject *p_instance);
diff --git a/platform/android/api/jni_singleton.h b/platform/android/api/jni_singleton.h
index 965eaabf81..74ca10e5e2 100644
--- a/platform/android/api/jni_singleton.h
+++ b/platform/android/api/jni_singleton.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
+/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -31,10 +31,10 @@
#ifndef JNI_SINGLETON_H
#define JNI_SINGLETON_H
-#include <core/config/engine.h>
-#include <core/variant/variant.h>
+#include "core/config/engine.h"
+#include "core/variant/variant.h"
#ifdef ANDROID_ENABLED
-#include <platform/android/jni_utils.h>
+#include "platform/android/jni_utils.h"
#endif
class JNISingleton : public Object {
@@ -52,7 +52,7 @@ class JNISingleton : public Object {
#endif
public:
- virtual Variant call(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error) override {
+ virtual Variant callp(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error) override {
#ifdef ANDROID_ENABLED
Map<StringName, MethodData>::Element *E = method_map.find(p_method);
@@ -70,7 +70,7 @@ public:
if (call_error) {
// The method is not in this map, defaulting to the regular instance calls.
- return Object::call(p_method, p_args, p_argcount, r_error);
+ return Object::callp(p_method, p_args, p_argcount, r_error);
}
ERR_FAIL_COND_V(!instance, Variant());
@@ -93,8 +93,9 @@ public:
for (int i = 0; i < p_argcount; i++) {
jvalret vr = _variant_to_jvalue(env, E->get().argtypes[i], p_args[i]);
v[i] = vr.val;
- if (vr.obj)
+ if (vr.obj) {
to_erase.push_back(vr.obj);
+ }
}
Variant ret;
@@ -175,7 +176,7 @@ public:
#else // ANDROID_ENABLED
// Defaulting to the regular instance calls.
- return Object::call(p_method, p_args, p_argcount, r_error);
+ return Object::callp(p_method, p_args, p_argcount, r_error);
#endif
}
@@ -197,18 +198,19 @@ public:
}
void add_signal(const StringName &p_name, const Vector<Variant::Type> &p_args) {
- if (p_args.size() == 0)
+ if (p_args.size() == 0) {
ADD_SIGNAL(MethodInfo(p_name));
- else if (p_args.size() == 1)
+ } else if (p_args.size() == 1) {
ADD_SIGNAL(MethodInfo(p_name, PropertyInfo(p_args[0], "arg1")));
- else if (p_args.size() == 2)
+ } else if (p_args.size() == 2) {
ADD_SIGNAL(MethodInfo(p_name, PropertyInfo(p_args[0], "arg1"), PropertyInfo(p_args[1], "arg2")));
- else if (p_args.size() == 3)
+ } else if (p_args.size() == 3) {
ADD_SIGNAL(MethodInfo(p_name, PropertyInfo(p_args[0], "arg1"), PropertyInfo(p_args[1], "arg2"), PropertyInfo(p_args[2], "arg3")));
- else if (p_args.size() == 4)
+ } else if (p_args.size() == 4) {
ADD_SIGNAL(MethodInfo(p_name, PropertyInfo(p_args[0], "arg1"), PropertyInfo(p_args[1], "arg2"), PropertyInfo(p_args[2], "arg3"), PropertyInfo(p_args[3], "arg4")));
- else if (p_args.size() == 5)
+ } else if (p_args.size() == 5) {
ADD_SIGNAL(MethodInfo(p_name, PropertyInfo(p_args[0], "arg1"), PropertyInfo(p_args[1], "arg2"), PropertyInfo(p_args[2], "arg3"), PropertyInfo(p_args[3], "arg4"), PropertyInfo(p_args[4], "arg5")));
+ }
}
#endif