1 /* 2 * Copyright (c) 2025 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 #ifndef UIFIRST_PARAM_H 17 #define UIFIRST_PARAM_H 18 19 #include "feature_param.h" 20 21 namespace OHOS::Rosen { 22 class UIFirstParam : public FeatureParam { 23 public: 24 UIFirstParam() = default; 25 ~UIFirstParam() = default; 26 27 static bool IsUIFirstEnable(); 28 static bool IsCardUIFirstEnable(); 29 static bool IsCacheOptimizeRotateEnable(); 30 static bool IsFreeMultiWindowEnable(); 31 static int GetUIFirstEnableWindowThreshold(); 32 static int GetUIFirstType(); 33 34 protected: 35 static void SetUIFirstEnable(bool isEnable); 36 static void SetCardUIFirstEnable(bool isCardUIFirstEnable); 37 static void SetCacheOptimizeRotateEnable(bool isCacheOptimizeRotateEnable); 38 static void SetFreeMultiWindowEnable(bool isFreeMultiWindowEnable); 39 static void SetUIFirstEnableWindowThreshold(int uiFirstEnableWindowThreshold); 40 static void SetUIFirstType(int uiFirstType); 41 42 private: 43 inline static bool isUIFirstEnable_ = true; 44 inline static bool isCardUIFirstEnable_ = true; 45 inline static bool isCacheOptimizeRotateEnable_ = false; 46 inline static bool isFreeMultiWindowEnable_ = false; 47 inline static int uiFirstEnableWindowThreshold_ = 0; 48 inline static int uiFirstType_ = 1; 49 50 friend class UIFirstParamParse; 51 }; 52 } // namespace OHOS::Rosen 53 #endif // UIFIRST_PARAM_H