1 /* 2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #include "base/utils/system_properties.h" 17 18 namespace OHOS::Ace { 19 DeviceType SystemProperties::deviceType_ = DeviceType::UNKNOWN; 20 DeviceOrientation SystemProperties::orientation_ { DeviceOrientation::PORTRAIT }; 21 bool SystemProperties::isHookModeEnabled_ = false; 22 bool SystemProperties::rosenBackendEnabled_ = true; 23 bool SystemProperties::windowAnimationEnabled_ = true; 24 double SystemProperties::resolution_ = 0.0; 25 constexpr float defaultAnimationScale = 1.0f; 26 bool SystemProperties::extSurfaceEnabled_ = false; 27 GetFontWeightScale()28float SystemProperties::GetFontWeightScale() 29 { 30 // Default value of font weight scale is 1.0. 31 return 1.0f; 32 } 33 GetDeviceType()34DeviceType SystemProperties::GetDeviceType() 35 { 36 return DeviceType::PHONE; 37 } 38 GetDebugEnabled()39bool SystemProperties::GetDebugEnabled() 40 { 41 return false; 42 } 43 GetAnimationScale()44float SystemProperties::GetAnimationScale() 45 { 46 return defaultAnimationScale; 47 } 48 } // namespace OHOS::Ace 49