mirror of
https://github.com/openharmony/arkui_ui_appearance.git
synced 2026-07-20 11:17:40 -04:00
cherry pick 24d9e57 from https://gitee.com/sodanotgreen/arkui_ui_appearance/pulls/44
超时机制 Signed-off-by: sodanotgreen <limengzheng@huawei.com>
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
"ability_base",
|
||||
"access_token",
|
||||
"c_utils",
|
||||
"hicollie",
|
||||
"hilog",
|
||||
"init",
|
||||
"ipc",
|
||||
|
||||
@@ -62,6 +62,7 @@ ohos_shared_library("ui_appearance_client") {
|
||||
deps = []
|
||||
external_deps = [
|
||||
"c_utils:utils",
|
||||
"hicollie:libhicollie",
|
||||
"hilog:libhilog",
|
||||
"ipc:ipc_single",
|
||||
"safwk:system_ability_fwk",
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
#include "system_ability_definition.h"
|
||||
#include "ui_appearance_ability_proxy.h"
|
||||
#include "ui_appearance_log.h"
|
||||
#include "xcollie/xcollie.h"
|
||||
#include "xcollie/xcollie_define.h"
|
||||
|
||||
namespace OHOS {
|
||||
namespace ArkUi::UiAppearance {
|
||||
@@ -77,7 +79,11 @@ int32_t UiAppearanceAbilityClient::GetFontScale(std::string &fontScale)
|
||||
LOGE("GetDarkMode quit because redoing CreateUiAppearanceServiceProxy failed.");
|
||||
return UiAppearanceAbilityInterface::ErrCode::SYS_ERR;
|
||||
}
|
||||
return uiAppearanceServiceProxy_->GetFontScale(fontScale);
|
||||
int id = HiviewDFX::XCollie::GetInstance().SetTimer(
|
||||
"GetFontScale", 10, nullptr, nullptr, HiviewDFX::XCOLLIE_FLAG_LOG);
|
||||
auto res = uiAppearanceServiceProxy_->GetFontScale(fontScale);
|
||||
HiviewDFX::XCollie::GetInstance().CancelTimer(id);
|
||||
return res;
|
||||
}
|
||||
|
||||
int32_t UiAppearanceAbilityClient::SetFontWeightScale(std::string &fontWeightScale)
|
||||
|
||||
Reference in New Issue
Block a user