Update tdlib and tdlight
This commit is contained in:
parent
e303fff297
commit
5903e67278
@ -1 +1 @@
|
||||
Subproject commit b342ec33e535893312af1ded6a67f8c4f784aee5
|
||||
Subproject commit e1ebf743988edfcf4400cd5d33a664ff941dc13e
|
@ -1 +1 @@
|
||||
Subproject commit 49fd5cbd874601da8a9ff0083894d7104a4e8680
|
||||
Subproject commit ec53407e13d939743244e1492c232c25cef69b4d
|
@ -102,7 +102,10 @@ static constexpr jint JAVA_VERSION = JNI_VERSION_1_6;
|
||||
static JavaVM *java_vm;
|
||||
static jclass log_class;
|
||||
|
||||
static void on_fatal_error(const char *error_message) {
|
||||
static void on_log_message(int verbosity_level, const char *error_message) {
|
||||
if (verbosity_level != 0) {
|
||||
return;
|
||||
}
|
||||
auto env = td::jni::get_jni_env(java_vm, JAVA_VERSION);
|
||||
jmethodID on_fatal_error_method = env->GetStaticMethodID(log_class, "onFatalError", "(Ljava/lang/String;)V");
|
||||
if (env && on_fatal_error_method) {
|
||||
@ -152,7 +155,7 @@ static jint register_native(JavaVM *vm) {
|
||||
td::jni::init_vars(env, API_PACKAGE_NAME);
|
||||
td::td_api::Object::init_jni_vars(env, API_PACKAGE_NAME);
|
||||
td::td_api::Function::init_jni_vars(env, API_PACKAGE_NAME);
|
||||
td::Log::set_fatal_error_callback(on_fatal_error);
|
||||
td::Log::set_log_message_callback(0, on_log_message);
|
||||
|
||||
return JAVA_VERSION;
|
||||
}
|
||||
|
@ -102,7 +102,10 @@ static constexpr jint JAVA_VERSION = JNI_VERSION_1_6;
|
||||
static JavaVM *java_vm;
|
||||
static jclass log_class;
|
||||
|
||||
static void on_fatal_error(const char *error_message) {
|
||||
static void on_log_message_(int verbosity_level, const char *error_message) {
|
||||
if (verbosity_level != 0) {
|
||||
return;
|
||||
}
|
||||
auto env = td::jni::get_jni_env(java_vm, JAVA_VERSION);
|
||||
jmethodID on_fatal_error_method = env->GetStaticMethodID(log_class, "onFatalError", "(Ljava/lang/String;)V");
|
||||
if (env && on_fatal_error_method) {
|
||||
@ -152,7 +155,7 @@ static jint register_native(JavaVM *vm) {
|
||||
td::jni::init_vars(env, API_PACKAGE_NAME);
|
||||
td::td_api::Object::init_jni_vars(env, API_PACKAGE_NAME);
|
||||
td::td_api::Function::init_jni_vars(env, API_PACKAGE_NAME);
|
||||
td::Log::set_fatal_error_callback(on_fatal_error);
|
||||
td::Log::set_log_message_callback(0, on_fatal_error);
|
||||
|
||||
return JAVA_VERSION;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user