mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-30 04:14:56 +00:00
Ladybird/Android: Explicitly schedule Core::EventLoop in main activity
Instead of having an annoying loop that constantly reschedules a Core::EventLoop trigger, have the ALooperEventLoopManager do it itself in the did_post_event() function. We cannot simply re-use the Unix implementation directly because that implementation expects to actually be called all the time in order to service timers. If you don't call its' pump() method, timers do not get triggered. So, we do still need the seconary thread for Timers that was added earlier.
This commit is contained in:
committed by
Andrew Kaster
parent
ff0494c63b
commit
642a2570a8
@@ -12,15 +12,10 @@ using namespace Ladybird;
|
||||
jclass WebViewImplementationNative::global_class_reference;
|
||||
jmethodID WebViewImplementationNative::bind_webcontent_method;
|
||||
jmethodID WebViewImplementationNative::invalidate_layout_method;
|
||||
JavaVM* WebViewImplementationNative::global_vm;
|
||||
|
||||
extern "C" JNIEXPORT void JNICALL
|
||||
Java_org_serenityos_ladybird_WebViewImplementation_00024Companion_nativeClassInit(JNIEnv* env, jobject /* thiz */)
|
||||
{
|
||||
auto ret = env->GetJavaVM(&WebViewImplementationNative::global_vm);
|
||||
if (ret != 0)
|
||||
TODO();
|
||||
|
||||
auto local_class = env->FindClass("org/serenityos/ladybird/WebViewImplementation");
|
||||
if (!local_class)
|
||||
TODO();
|
||||
|
||||
Reference in New Issue
Block a user