modify getFloat

Signed-off-by: wplan1 <wangpeng163@huawei.com>
This commit is contained in:
wplan1
2022-03-14 16:01:12 +08:00
parent 5949f596ad
commit a3ddb73bb9
2 changed files with 2 additions and 2 deletions
-1
View File
@@ -183,7 +183,6 @@ ohos_shared_library("librawfile") {
deps = [
"//base/global/resmgr_standard/interfaces/native/resource:librawfile_ndk",
"//utils/native/base:utils",
]
public_deps = [
@@ -457,7 +457,8 @@ RState ResourceManagerImpl::RecalculateFloat(const std::string &unit, float &res
GetResConfig(rc);
ScreenDensity srcDensity = rc.GetScreenDensity();
if (srcDensity == SCREEN_DENSITY_NOT_SET) {
return ERROR;
HILOG_INFO("RecalculateFloat srcDensity SCREEN_DENSITY_NOT_SET ");
return SUCCESS;
}
float density = srcDensity / DEFAULT_DENSITY;
if (unit == VIRTUAL_PIXEL) {