summaryrefslogtreecommitdiffstats
path: root/platform/android/java_class_wrapper.cpp
diff options
context:
space:
mode:
authorIgnacio Etcheverry <ignalfonsore@gmail.com>2020-01-19 20:02:40 +0100
committerIgnacio Etcheverry <ignalfonsore@gmail.com>2020-01-19 20:15:13 +0100
commita6105c8ea0bdae9d56d1943409d89cc71288306a (patch)
treee94ae56326809035e38d3f7bb6cdfb747e692d5c /platform/android/java_class_wrapper.cpp
parentd11d7dfe3e15e34ba400e6b73d618abc4b8f5886 (diff)
downloadredot-engine-a6105c8ea0bdae9d56d1943409d89cc71288306a.tar.gz
Fix ClassDB API portability with some android and editor classes
- `EditorNavigationMeshGenerator` was being registered as part of the Core API, even after d3f48f88bb84d22b7805ce971ac86cf1953a29fd. We must make sure to set Editor as the current ClassDB API type before creating an instance. - The `VisualScriptEngineSingleton.constant` property has a property hint string that's different between tools and non-tools builds. This commit makes the hint string to no longer be set in `_bind_methods`, and to instead set it in `_validate_property`. This way it's ignored when calculating the API hash. - `JavaClassWrapper` is now registered in ClassDB on all platforms, using a dummy implementation on platforms other than Android. This fixes API portability between Android and other platforms. - Updated `--class-db-json` command to ignore non-virtual methods that start with an underscore (see: 4be87c6016a5893cbde897924e540df4c988cee5).
Diffstat (limited to 'platform/android/java_class_wrapper.cpp')
-rw-r--r--platform/android/java_class_wrapper.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/platform/android/java_class_wrapper.cpp b/platform/android/java_class_wrapper.cpp
index feebea2738..fe2fd89710 100644
--- a/platform/android/java_class_wrapper.cpp
+++ b/platform/android/java_class_wrapper.cpp
@@ -28,7 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "java_class_wrapper.h"
+#include "api/java_class_wrapper.h"
#include "string_android.h"
#include "thread_jandroid.h"
@@ -546,11 +546,6 @@ JavaObject::~JavaObject() {
////////////////////
-void JavaClassWrapper::_bind_methods() {
-
- ClassDB::bind_method(D_METHOD("wrap", "name"), &JavaClassWrapper::wrap);
-}
-
bool JavaClassWrapper::_get_type_sig(JNIEnv *env, jobject obj, uint32_t &sig, String &strsig) {
jstring name2 = (jstring)env->CallObjectMethod(obj, Class_getName);