mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 07:37:35 +00:00
Ladybird/Android: Set up a Core::Resource implementation in services
Use the File implementation until we get around to creating one that uses AssetManager
This commit is contained in:
parent
c9499a9755
commit
5b03135c46
1 changed files with 3 additions and 0 deletions
|
@ -8,6 +8,7 @@
|
|||
#include <AK/Atomic.h>
|
||||
#include <AK/Format.h>
|
||||
#include <Ladybird/Utilities.h>
|
||||
#include <LibCore/ResourceImplementationFile.h>
|
||||
#include <jni.h>
|
||||
|
||||
JavaVM* global_vm;
|
||||
|
@ -38,6 +39,8 @@ Java_org_serenityos_ladybird_LadybirdServiceBase_initNativeCode(JNIEnv* env, job
|
|||
char const* raw_resource_dir = env->GetStringUTFChars(resource_dir, nullptr);
|
||||
s_serenity_resource_root = raw_resource_dir;
|
||||
env->ReleaseStringUTFChars(resource_dir, raw_resource_dir);
|
||||
// FIXME: Use a custom Android version that uses AssetManager to load files.
|
||||
Core::ResourceImplementation::install(make<Core::ResourceImplementationFile>(MUST(String::formatted("{}/res", s_serenity_resource_root))));
|
||||
|
||||
char const* raw_tag_name = env->GetStringUTFChars(tag_name, nullptr);
|
||||
AK::set_log_tag_name(raw_tag_name);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue