src/core/android/SDL_android.cpp
changeset 7149 534891ad4897
parent 7130 28df4f1a1712
child 7190 11612d544fcd
     1.1 --- a/src/core/android/SDL_android.cpp	Sun May 05 15:50:21 2013 +0200
     1.2 +++ b/src/core/android/SDL_android.cpp	Sun May 05 15:54:56 2013 +0200
     1.3 @@ -339,10 +339,10 @@
     1.4  {
     1.5      jmethodID mid;
     1.6      JNIEnv *mEnv = Android_JNI_GetEnv();
     1.7 -    mid = mEnv->GetStaticMethodID(mActivityClass,"setActivityTitle","(Ljava/lang/String;)V");
     1.8 +    mid = mEnv->GetStaticMethodID(mActivityClass,"setActivityTitle","(Ljava/lang/String;)Z");
     1.9      if (mid) {
    1.10          jstring jtitle = reinterpret_cast<jstring>(mEnv->NewStringUTF(title));
    1.11 -        mEnv->CallStaticVoidMethod(mActivityClass, mid, jtitle);
    1.12 +        mEnv->CallStaticBooleanMethod(mActivityClass, mid, jtitle);
    1.13          mEnv->DeleteLocalRef(jtitle);
    1.14      }
    1.15  }
    1.16 @@ -1085,12 +1085,12 @@
    1.17      if (!env) {
    1.18          return -1;
    1.19      }
    1.20 -    jmethodID mid = env->GetStaticMethodID(mActivityClass, "sendMessage", "(II)V");
    1.21 +    jmethodID mid = env->GetStaticMethodID(mActivityClass, "sendMessage", "(II)Z");
    1.22      if (!mid) {
    1.23          return -1;
    1.24      }
    1.25 -    env->CallStaticVoidMethod(mActivityClass, mid, command, param);
    1.26 -    return 0;
    1.27 +    jboolean success = env->CallStaticBooleanMethod(mActivityClass, mid, command, param);
    1.28 +    return success ? 0 : -1;
    1.29  }
    1.30  
    1.31  extern "C" void Android_JNI_ShowTextInput(SDL_Rect *inputRect)
    1.32 @@ -1100,11 +1100,11 @@
    1.33          return;
    1.34      }
    1.35  
    1.36 -    jmethodID mid = env->GetStaticMethodID(mActivityClass, "showTextInput", "(IIII)V");
    1.37 +    jmethodID mid = env->GetStaticMethodID(mActivityClass, "showTextInput", "(IIII)Z");
    1.38      if (!mid) {
    1.39          return;
    1.40      }
    1.41 -    env->CallStaticVoidMethod( mActivityClass, mid,
    1.42 +    env->CallStaticBooleanMethod( mActivityClass, mid,
    1.43                                 inputRect->x,
    1.44                                 inputRect->y,
    1.45                                 inputRect->w,