!44861 THPExtraManagerImpl修改

Merge pull request !44861 from Lby/lby_zyc
This commit is contained in:
openharmony_ci 2024-09-30 04:22:06 +00:00 committed by Gitee
commit 4a2168192d
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 6 additions and 2 deletions

View File

@ -22,12 +22,16 @@
#include "base/json/json_util.h"
namespace OHOS::Ace::NG {
void* THPExtraManagerImpl::lib_ = nullptr;
bool THPExtraManagerImpl::Init()
{
ThpExtraRunCommand_ = [](const char* command, const char* parameters) -> const char* {
return "ok";
};
lib_ = dlopen("/system/lib64/libthp_extra_innerapi.z.so", RTLD_LAZY);
if (lib_ == nullptr) {
lib_ = dlopen("/system/lib64/libthp_extra_innerapi.z.so", RTLD_LAZY);
}
if (lib_ == nullptr) {
LOGI("Failed to open libthp_extra_innerapi.z.so, reason: %{public}s", dlerror());
return false;

View File

@ -31,7 +31,7 @@ public:
int32_t GetHeight(void) const override;
int32_t GetWidth(void) const override;
private:
void* lib_ = nullptr;
static void* lib_;
bool enable_ = false;
int32_t height_ = 0;
int32_t width_ = 0;