mirror of
https://github.com/encounter/SDL.git
synced 2025-12-13 07:06:10 +00:00
Fixed bug 2258 - Crash when using Android clipboard
chw The Android clipboard manager methods must be called from the UI thread, otherwise crashes of the dalvikvm happen.
This commit is contained in:
@@ -1041,7 +1041,7 @@ static jobject Android_JNI_GetSystemServiceObject(const char* name)
|
||||
mid = (*env)->GetStaticMethodID(env, mActivityClass, "getContext", "()Landroid/content/Context;");
|
||||
jobject context = (*env)->CallStaticObjectMethod(env, mActivityClass, mid);
|
||||
|
||||
mid = (*env)->GetMethodID(env, mActivityClass, "getSystemService", "(Ljava/lang/String;)Ljava/lang/Object;");
|
||||
mid = (*env)->GetMethodID(env, mActivityClass, "getSystemServiceFromUiThread", "(Ljava/lang/String;)Ljava/lang/Object;");
|
||||
jobject manager = (*env)->CallObjectMethod(env, context, mid, service);
|
||||
|
||||
(*env)->DeleteLocalRef(env, service);
|
||||
|
||||
Reference in New Issue
Block a user