1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 13:27:36 +00:00

Ladybird/Android: Move common service functionality to a base class

Create LadybirdServiceBase to hold the standard "set resource dir" and
"init ipc sockets" service functionality that will be common between the
WebContent, RequestServer, and WebSocket services.

Refactor the handler class slightly to avoid the HandlerLeak lint by
making the class a static class inside the companion object and use a
WeakReference to the service instead of a strong one.
This commit is contained in:
Andrew Kaster 2023-09-15 15:09:01 -06:00 committed by Andrew Kaster
parent 315ad2d391
commit da8f450335
8 changed files with 117 additions and 91 deletions

View file

@ -55,7 +55,7 @@ else()
if (ANDROID)
target_sources(webcontent PRIVATE
../Android/src/main/cpp/WebContentService.cpp
../Android/src/main/cpp/WebContentServiceJNI.cpp
../Android/src/main/cpp/LadybirdServiceBaseJNI.cpp
)
target_link_libraries(webcontent PRIVATE android)
endif()