summaryrefslogtreecommitdiff
path: root/src/jvm
diff options
context:
space:
mode:
Diffstat (limited to 'src/jvm')
-rw-r--r--src/jvm/jvm.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/jvm/jvm.c b/src/jvm/jvm.c
index f54aad5..bbba360 100644
--- a/src/jvm/jvm.c
+++ b/src/jvm/jvm.c
@@ -541,9 +541,15 @@ static jboolean
JNIEnv_IsInstanceOf(JNIEnv* p0, jobject p1, jclass p2)
{
assert(p0 && p1 && p2);
+ // FIXME: we don't have inheritance
verbose("%u, %u", (uint32_t)(uintptr_t)p1, (uint32_t)(uintptr_t)p2);
verbose("%s", jvm_get_object(jnienv_get_jvm(p0), jvm_get_object(jnienv_get_jvm(p0), p1)->this_klass)->klass.name.data);
verbose("%s", jvm_get_object(jnienv_get_jvm(p0), p2)->klass.name.data);
+
+ if (strstr(jvm_get_object(jnienv_get_jvm(p0), jvm_get_object(jnienv_get_jvm(p0), p1)->this_klass)->klass.name.data, "MotionEvent") ||
+ strstr(jvm_get_object(jnienv_get_jvm(p0), p2)->klass.name.data, "MotionEvent"))
+ return true;
+
return jvm_get_object(jnienv_get_jvm(p0), p1)->this_klass == p2;
}