diff --git a/Ladybird/Android/src/main/cpp/LadybirdActivity.cpp b/Ladybird/Android/src/main/cpp/LadybirdActivity.cpp index f3ad098bda0..82225ae929f 100644 --- a/Ladybird/Android/src/main/cpp/LadybirdActivity.cpp +++ b/Ladybird/Android/src/main/cpp/LadybirdActivity.cpp @@ -30,6 +30,13 @@ static OwnPtr s_main_event_loop; static jobject s_java_instance; static jmethodID s_schedule_event_loop_method; +struct Application : public WebView::Application { + WEB_VIEW_APPLICATION(Application); +}; + +Application::Application(Badge, Main::Arguments&) +{ +} extern "C" JNIEXPORT void JNICALL Java_org_serenityos_ladybird_LadybirdActivity_initNativeCode(JNIEnv*, jobject, jstring, jstring, jobject); @@ -76,10 +83,17 @@ Java_org_serenityos_ladybird_LadybirdActivity_initNativeCode(JNIEnv* env, jobjec Core::EventLoopManager::install(*event_loop_manager); s_main_event_loop = make(); + // The strings cannot be empty + Main::Arguments arguments = { + .argc = 0, + .argv = nullptr, + .strings = Span { new StringView("ladybird"sv), 1 } + }; + // FIXME: We are not making use of this Application object to track our processes. // So, right now, the Application's ProcessManager is constantly empty. // (However, LibWebView depends on an Application object existing, so we do have to actually create one.) - s_application = make(0, nullptr); + s_application = Application::create(arguments, "about:newtab"sv); } extern "C" JNIEXPORT void JNICALL