• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021-2023 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 FOUNDATION_ACE_FRAMEWORKS_BASE_UTILS_SYSTEM_PROPERTIES_H
17 #define FOUNDATION_ACE_FRAMEWORKS_BASE_UTILS_SYSTEM_PROPERTIES_H
18 
19 #include <atomic>
20 #include <cstdint>
21 #include <memory>
22 #include <optional>
23 #include <string>
24 
25 #include "base/utils/device_config.h"
26 #include "base/utils/device_type.h"
27 #include "base/utils/macros.h"
28 
29 namespace OHOS::Ace {
30 
31 enum class ResolutionType : int32_t {
32     RESOLUTION_NONE = -2,
33     RESOLUTION_ANY = -1,
34     RESOLUTION_LDPI = 120,
35     RESOLUTION_MDPI = 160,
36     RESOLUTION_HDPI = 240,
37     RESOLUTION_XHDPI = 320,
38     RESOLUTION_XXHDPI = 480,
39     RESOLUTION_XXXHDPI = 640,
40 };
41 
42 enum class FoldScreenType: int32_t {
43     UNKNOWN = 0,
44     BIG_FOLDER = 1,
45     SMALL_FOLDER = 2,
46     OUTER_FOLDER = 3,
47     SUPER_FOLDER = 5,
48 };
49 
50 constexpr int32_t MCC_UNDEFINED = 0;
51 constexpr int32_t MNC_UNDEFINED = 0;
52 extern const char ENABLE_DEBUG_BOUNDARY_KEY[];
53 extern const char ENABLE_TRACE_LAYOUT_KEY[];
54 extern const char ENABLE_TRACE_INPUTEVENT_KEY[];
55 extern const char ENABLE_SECURITY_DEVELOPERMODE_KEY[];
56 extern const char ENABLE_DEBUG_STATEMGR_KEY[];
57 
58 enum class LongScreenType : int32_t {
59     LONG = 0,
60     NOT_LONG,
61     LONG_SCREEN_UNDEFINED,
62 };
63 
64 enum class ScreenShape : int32_t {
65     ROUND = 0,
66     NOT_ROUND,
67     SCREEN_SHAPE_UNDEFINED,
68 };
69 
70 union DebugFlags {
flag_(flag)71     DebugFlags(int64_t flag = 0) : flag_(flag) {}
72     int64_t flag_;
73     struct {
74         bool containerMultiThread_ : 1;
75         bool getHostOnDetach_ : 1;
76         bool claimDeathObj_ : 1;
77         bool aceObjTypeCvt_ : 1;
78         bool jsObjTypeCvt_ : 1;
79         bool objDestroyInUse_ : 1;
80         bool useInvalidIter_ : 1;
81     } bits_;
82 };
83 
84 struct WidthLayoutBreakPoint {
85     double widthVPXS_ = 320.0;
86     double widthVPSM_ = 600.0;
87     double widthVPMD_ = 840.0;
88     double widthVPLG_ = 1440.0;
89     double widthVPXL_ = -1.0;  // 默认不生效
90     WidthLayoutBreakPoint() = default;
91     WidthLayoutBreakPoint(
92         double widthVPXS, double widthVPSM, double widthVPMD, double widthVPLG, double widthVPXL = -1.0)
widthVPXS_WidthLayoutBreakPoint93         : widthVPXS_(widthVPXS), widthVPSM_(widthVPSM), widthVPMD_(widthVPMD), widthVPLG_(widthVPLG),
94           widthVPXL_(widthVPXL)
95     {}
WidthLayoutBreakPointWidthLayoutBreakPoint96     WidthLayoutBreakPoint(std::vector<double> breakPoints)
97         : widthVPXS_(breakPoints.size() > 0 ? breakPoints[0] : -1.0), // XS与SM临界值
98           widthVPSM_(breakPoints.size() > 1 ? breakPoints[1] : -1.0), // SM与MD临界值
99           widthVPMD_(breakPoints.size() > 2 ? breakPoints[2] : -1.0), // MD与LG临界值
100           widthVPLG_(breakPoints.size() > 3 ? breakPoints[3] : -1.0), // LG与XL临界值
101           widthVPXL_(breakPoints.size() > 4 ? breakPoints[4] : -1.0) // XL与XXL临界值
102     {}
103     bool operator==(WidthLayoutBreakPoint &v)
104     {
105         return widthVPXS_ == v.widthVPXS_ && widthVPSM_ == v.widthVPSM_ && widthVPMD_ == v.widthVPMD_ &&
106                widthVPLG_ == v.widthVPLG_ && widthVPXL_ == v.widthVPXL_;
107     }
108     bool operator==(const WidthLayoutBreakPoint &v)
109     {
110         return widthVPXS_ == v.widthVPXS_ && widthVPSM_ == v.widthVPSM_ && widthVPMD_ == v.widthVPMD_ &&
111                widthVPLG_ == v.widthVPLG_ && widthVPXL_ == v.widthVPXL_;
112     }
113     bool operator!=(WidthLayoutBreakPoint &v)
114     {
115         return widthVPXS_ != v.widthVPXS_ || widthVPSM_ != v.widthVPSM_ || widthVPMD_ != v.widthVPMD_ ||
116                widthVPLG_ != v.widthVPLG_ || widthVPXL_ != v.widthVPXL_;
117     }
118     bool operator!=(const WidthLayoutBreakPoint &v)
119     {
120         return widthVPXS_ != v.widthVPXS_ || widthVPSM_ != v.widthVPSM_ || widthVPMD_ != v.widthVPMD_ ||
121                widthVPLG_ != v.widthVPLG_ || widthVPXL_ != v.widthVPXL_;
122     }
123 };
124 
125 struct HeightLayoutBreakPoint {
126     double heightVPRATIOSM_ = 0.8;
127     double heightVPRATIOMD_ = 1.2;
128     HeightLayoutBreakPoint() = default;
HeightLayoutBreakPointHeightLayoutBreakPoint129     HeightLayoutBreakPoint(double heightVPRATIOSM, double heightVPRATIOMD)
130         : heightVPRATIOSM_(heightVPRATIOSM), heightVPRATIOMD_(heightVPRATIOMD) {}
131 };
132 
133 class ACE_FORCE_EXPORT SystemProperties final {
134 public:
135     /*
136      * Init device type for Ace.
137      */
138     static void InitDeviceType(DeviceType deviceType);
139 
140     /*
141      * Init device info for Ace.
142      */
143     static void InitDeviceInfo(
144         int32_t deviceWidth, int32_t deviceHeight, int32_t orientation, double resolution, bool isRound);
145 
146     /*
147      * Init device type according to system property.
148      */
149     static void InitDeviceTypeBySystemProperty();
150 
151     /**
152      * Init fold screen type according to system property.
153      */
154     static void InitFoldScreenTypeBySystemProperty();
155 
156     /*
157      * Get type of current device.
158      */
159     static DeviceType GetDeviceType();
160 
161     /*
162      * Get if current device need avoid window.
163      */
164     static bool GetNeedAvoidWindow();
165 
166     /*
167      * check SystemCapability.
168      */
169     static bool IsSyscapExist(const char* cap);
170     /*
171      * check ApiVersion.
172      */
173     static bool IsApiVersionGreaterOrEqual(int majorVersion, int minorVersion, int patchVersion);
174 
175     /**
176      * Set type of current device.
177      * @param deviceType
178      */
SetDeviceType(DeviceType deviceType)179     static void SetDeviceType(DeviceType deviceType)
180     {
181         deviceType_ = deviceType;
182     }
183 
184     /*
185      * Get current orientation of device.
186      */
GetDeviceOrientation()187     static DeviceOrientation GetDeviceOrientation()
188     {
189         return orientation_;
190     }
191 
192     /*
193      * Get width of device.
194      */
GetDeviceWidth()195     static int32_t GetDeviceWidth()
196     {
197         return deviceWidth_;
198     }
199 
200     /*
201      * Get height of device.
202      */
GetDeviceHeight()203     static int32_t GetDeviceHeight()
204     {
205         return deviceHeight_;
206     }
207 
208     /*
209      * Set physical width of device.
210      */
SetDevicePhysicalWidth(int32_t devicePhysicalWidth)211     static void SetDevicePhysicalWidth(int32_t devicePhysicalWidth)
212     {
213         devicePhysicalWidth_ = devicePhysicalWidth;
214     }
215 
216     /*
217      * Set physical height of device.
218      */
SetDevicePhysicalHeight(int32_t devicePhysicalHeight)219     static void SetDevicePhysicalHeight(int32_t devicePhysicalHeight)
220     {
221         devicePhysicalHeight_ = devicePhysicalHeight;
222     }
223 
224     /*
225      * Get physical width of device.
226      */
GetDevicePhysicalWidth()227     static int32_t GetDevicePhysicalWidth()
228     {
229         return devicePhysicalWidth_;
230     }
231 
232     /*
233      * Get physical height of device.
234      */
GetDevicePhysicalHeight()235     static int32_t GetDevicePhysicalHeight()
236     {
237         return devicePhysicalHeight_;
238     }
239 
240     /*
241      * Get wght scale of device.
242      */
243     static float GetFontWeightScale();
244 
SetFontWeightScale(const float fontWeightScale)245     static void SetFontWeightScale(const float fontWeightScale)
246     {
247         if (fontWeightScale_ != fontWeightScale) {
248             fontWeightScale_ = fontWeightScale;
249         }
250     }
251 
252     /*
253      * Get size scale of device.
254      */
255     static float GetFontScale();
256 
SetFontScale(const float fontScale)257     static void SetFontScale(const float fontScale)
258     {
259         if (fontScale != fontScale_) {
260             fontScale_ = fontScale;
261         }
262     }
263 
264     /*
265      * Get density of default display.
266      */
GetResolution()267     static double GetResolution()
268     {
269         return resolution_;
270     }
271 
272     /*
273      * Set resolution of device.
274      */
SetResolution(double resolution)275     static void SetResolution(double resolution)
276     {
277         resolution_ = resolution;
278     }
279 
GetIsScreenRound()280     static bool GetIsScreenRound()
281     {
282         return isRound_;
283     }
284 
GetBrand()285     static const std::string& GetBrand()
286     {
287         return brand_;
288     }
289 
GetManufacturer()290     static const std::string& GetManufacturer()
291     {
292         return manufacturer_;
293     }
294 
GetModel()295     static const std::string& GetModel()
296     {
297         return model_;
298     }
299 
GetProduct()300     static const std::string& GetProduct()
301     {
302         return product_;
303     }
304 
GetApiVersion()305     static const std::string& GetApiVersion()
306     {
307         return apiVersion_;
308     }
309 
GetReleaseType()310     static const std::string& GetReleaseType()
311     {
312         return releaseType_;
313     }
314 
GetParamDeviceType()315     static const std::string& GetParamDeviceType()
316     {
317         return paramDeviceType_;
318     }
319 
320     static std::string GetLanguage();
321 
322     static bool GetContainerDeleteFlag();
323 
324     static std::string GetRegion();
325 
326     static std::string GetNewPipePkg();
327 
328     static float GetAnimationScale();
329 
330     static std::string GetPartialUpdatePkg();
331 
332     static int32_t GetSvgMode();
333 
334     static bool GetDebugPixelMapSaveEnabled();
335 
336     static bool IsPixelRoundEnabled();
337 
GetRosenBackendEnabled()338     static bool GetRosenBackendEnabled()
339     {
340         return rosenBackendEnabled_;
341     }
342 
GetHookModeEnabled()343     static bool GetHookModeEnabled()
344     {
345         return isHookModeEnabled_;
346     }
347 
GetDeveloperModeOn()348     static bool GetDeveloperModeOn()
349     {
350         return developerModeOn_;
351     }
352 
GetDebugBoundaryEnabled()353     static bool GetDebugBoundaryEnabled()
354     {
355         return debugBoundaryEnabled_.load();
356     }
357 
GetDebugOffsetLogEnabled()358     static bool GetDebugOffsetLogEnabled()
359     {
360         return debugOffsetLogEnabled_;
361     }
362 
GetDebugAutoUIEnabled()363     static bool GetDebugAutoUIEnabled()
364     {
365         return debugAutoUIEnabled_;
366     }
367 
GetDownloadByNetworkEnabled()368     static bool GetDownloadByNetworkEnabled()
369     {
370         return downloadByNetworkEnabled_;
371     }
372 
GetRecycleImageEnabled()373     static bool GetRecycleImageEnabled()
374     {
375         return recycleImageEnabled_;
376     }
377 
GetSvgTraceEnabled()378     static bool GetSvgTraceEnabled()
379     {
380         return svgTraceEnable_;
381     }
382 
GetLayoutTraceEnabled()383     static bool GetLayoutTraceEnabled()
384     {
385         return layoutTraceEnable_.load();
386     }
387 
GetSyncDebugTraceEnabled()388     static bool GetSyncDebugTraceEnabled()
389     {
390         return syncDebugTraceEnable_;
391     }
392 
GetPixelRoundEnabled()393     static bool GetPixelRoundEnabled()
394     {
395         return pixelRoundEnable_;
396     }
397 
GetTextTraceEnabled()398     static bool GetTextTraceEnabled()
399     {
400         return textTraceEnable_;
401     }
402 
GetSyntaxTraceEnabled()403     static bool GetSyntaxTraceEnabled()
404     {
405         return syntaxTraceEnable_;
406     }
407 
GetAccessTraceEnabled()408     static bool GetAccessTraceEnabled()
409     {
410         return accessTraceEnable_;
411     }
412 
GetVsyncModeTraceEnabled()413     static bool GetVsyncModeTraceEnabled()
414     {
415         return vsyncModeTraceEnable_;
416     }
417 
GetTraceInputEventEnabled()418     static bool GetTraceInputEventEnabled()
419     {
420         return traceInputEventEnable_.load();
421     }
422 
GetStateManagerEnabled()423     static bool GetStateManagerEnabled()
424     {
425         return stateManagerEnable_.load();
426     }
427 
SetStateManagerEnabled(bool stateManagerEnable)428     static void SetStateManagerEnabled(bool stateManagerEnable)
429     {
430         stateManagerEnable_.store(stateManagerEnable);
431     }
432 
SetFaultInjectEnabled(bool faultInjectEnable)433     static void SetFaultInjectEnabled(bool faultInjectEnable)
434     {
435         faultInjectEnabled_ = faultInjectEnable;
436     }
437 
GetFaultInjectEnabled()438     static bool GetFaultInjectEnabled()
439     {
440         return faultInjectEnabled_;
441     }
442 
GetBuildTraceEnabled()443     static bool GetBuildTraceEnabled()
444     {
445         return buildTraceEnable_;
446     }
447 
GetDynamicDetectionTraceEnabled()448     static bool GetDynamicDetectionTraceEnabled()
449     {
450         return dynamicDetectionTraceEnable_;
451     }
452 
453     static bool GetCacheNavigationNodeEnable();
454 
GetAccessibilityEnabled()455     static bool GetAccessibilityEnabled()
456     {
457         return accessibilityEnabled_;
458     }
459 
GetCanvasDebugMode()460     static uint32_t GetCanvasDebugMode()
461     {
462         return canvasDebugMode_;
463     }
464 
465     static bool GetDebugEnabled();
466 
DetectContainerMultiThread()467     static bool DetectContainerMultiThread()
468     {
469         return debugEnabled_ && debugFlags_.bits_.containerMultiThread_;
470     }
471 
DetectGetHostOnDetach()472     static bool DetectGetHostOnDetach()
473     {
474         return debugEnabled_ && debugFlags_.bits_.getHostOnDetach_;
475     }
476 
DetectClaimDeathObj()477     static bool DetectClaimDeathObj()
478     {
479         return debugEnabled_ && debugFlags_.bits_.claimDeathObj_;
480     }
481 
DetectAceObjTypeConvertion()482     static bool DetectAceObjTypeConvertion()
483     {
484         return debugEnabled_ && debugFlags_.bits_.aceObjTypeCvt_;
485     }
486 
DetectJsObjTypeConvertion()487     static bool DetectJsObjTypeConvertion()
488     {
489         return debugEnabled_ && debugFlags_.bits_.jsObjTypeCvt_;
490     }
491 
DetectObjDestroyInUse()492     static bool DetectObjDestroyInUse()
493     {
494         return debugEnabled_ && debugFlags_.bits_.objDestroyInUse_;
495     }
496 
DetectUseInvalidIterator()497     static bool DetectUseInvalidIterator()
498     {
499         return debugEnabled_ && debugFlags_.bits_.useInvalidIter_;
500     }
501 
GetMeasureDebugTraceEnabled()502     static bool GetMeasureDebugTraceEnabled()
503     {
504         return measureDebugTraceEnable_;
505     }
506 
GetSafeAreaDebugTraceEnabled()507     static bool GetSafeAreaDebugTraceEnabled()
508     {
509         return safeAreaDebugTraceEnable_;
510     }
511 
512     static bool GetLayoutDetectEnabled();
513 
GetGpuUploadEnabled()514     static bool GetGpuUploadEnabled()
515     {
516         return gpuUploadEnabled_;
517     }
518 
GetImageFrameworkEnabled()519     static bool GetImageFrameworkEnabled()
520     {
521         return imageFrameworkEnable_;
522     }
523 
524     /*
525      * Set device orientation.
526      */
527     static void SetDeviceOrientation(int32_t orientation);
528 
529     static constexpr char INVALID_PARAM[] = "N/A";
530 
GetMcc()531     static int32_t GetMcc()
532     {
533         return mcc_;
534     }
535 
GetMnc()536     static int32_t GetMnc()
537     {
538         return mnc_;
539     }
540 
SetDeviceAccess(bool isDeviceAccess)541     static void SetDeviceAccess(bool isDeviceAccess)
542     {
543         isDeviceAccess_ = isDeviceAccess;
544     }
545 
GetDeviceAccess()546     static bool GetDeviceAccess()
547     {
548         return isDeviceAccess_;
549     }
550 
SetConfigDeviceType(const std::string & type)551     static void SetConfigDeviceType(const std::string& type)
552     {
553         configDeviceType_ = type;
554     }
555 
GetConfigDeviceType()556     static const std::string& GetConfigDeviceType()
557     {
558         return configDeviceType_;
559     }
560 
561     static float GetScrollCoefficients();
562 
563     static bool GetTransformEnabled();
564 
565     static void InitMccMnc(int32_t mcc, int32_t mnc);
566 
GetScreenShape()567     static ScreenShape GetScreenShape()
568     {
569         return screenShape_;
570     }
571 
572     static int GetArkProperties();
573 
574     static std::string GetMemConfigProperty();
575 
576     static std::string GetArkBundleName();
577 
578     static size_t GetGcThreadNum();
579 
580     static size_t GetLongPauseTime();
581 
582     static void SetUnZipHap(bool unZipHap = true)
583     {
584         unZipHap_ = unZipHap;
585     }
586 
GetUnZipHap()587     static bool GetUnZipHap()
588     {
589         return unZipHap_;
590     }
591 
592     static bool GetAsmInterpreterEnabled();
593 
594     static std::string GetAsmOpcodeDisableRange();
595 
596     static bool IsScoringEnabled(const std::string& name);
597 
IsWindowSizeAnimationEnabled()598     static bool IsWindowSizeAnimationEnabled()
599     {
600         return windowAnimationEnabled_;
601     }
602 
IsAstcEnabled()603     static bool IsAstcEnabled()
604     {
605         return astcEnabled_;
606     }
607 
608     static bool GetWindowRectResizeEnabled();
609 
GetAstcMaxError()610     static int32_t GetAstcMaxError()
611     {
612         return astcMax_;
613     }
614 
GetAstcPsnr()615     static int32_t GetAstcPsnr()
616     {
617         return astcPsnr_;
618     }
619 
IsImageFileCacheConvertAstcEnabled()620     static bool IsImageFileCacheConvertAstcEnabled()
621     {
622         return imageFileCacheConvertAstc_;
623     }
624 
GetImageFileCacheConvertAstcThreshold()625     static int32_t GetImageFileCacheConvertAstcThreshold()
626     {
627         return imageFileCacheConvertAstcThreshold_;
628     }
629 
SetExtSurfaceEnabled(bool extSurfaceEnabled)630     static void SetExtSurfaceEnabled(bool extSurfaceEnabled)
631     {
632         extSurfaceEnabled_ = extSurfaceEnabled;
633     }
634 
GetExtSurfaceEnabled()635     static bool GetExtSurfaceEnabled()
636     {
637         return extSurfaceEnabled_;
638     }
639 
640     static bool GetAllowWindowOpenMethodEnabled();
641 
GetDumpFrameCount()642     static uint32_t GetDumpFrameCount()
643     {
644         return dumpFrameCount_;
645     }
646 
647     static bool GetIsUseMemoryMonitor();
648 
649     static bool IsFormAnimationLimited();
650 
651     static bool GetResourceDecoupling();
652 
653     static bool ConfigChangePerform();
654 
655     static void SetConfigChangePerform();
656 
657     static int32_t GetJankFrameThreshold();
658 
659     static bool GetTitleStyleEnabled();
660 
661     static std::string GetCustomTitleFilePath();
662 
663     static bool Is24HourClock();
664 
665     static std::optional<bool> GetRtlEnabled();
666 
GetEnableScrollableItemPool()667     static bool GetEnableScrollableItemPool()
668     {
669         return enableScrollableItemPool_;
670     }
671 
672     static bool GetDisplaySyncSkipEnabled();
673 
674     static bool GetNavigationBlurEnabled();
675 
676     static bool GetGridCacheEnabled();
677 
678     static bool GetGridIrregularLayoutEnabled();
679 
680     static bool GetForceSplitIgnoreOrientationEnabled();
681 
682     static std::optional<bool> GetArkUIHookEnabled();
683 
684     static bool WaterFlowUseSegmentedLayout();
685 
686     static bool GetSideBarContainerBlurEnable();
687 
688     using EnableSystemParameterCallback = void (*)(const char* key, const char* value, void* context);
689 
690     static void AddWatchSystemParameter(const char* key, void* context, EnableSystemParameterCallback callback);
691 
692     static void RemoveWatchSystemParameter(const char* key, void* context, EnableSystemParameterCallback callback);
693     static void EnableSystemParameterTraceLayoutCallback(const char* key, const char* value, void* context);
694     static void EnableSystemParameterTraceInputEventCallback(const char* key, const char* value, void* context);
695     static void EnableSystemParameterSecurityDevelopermodeCallback(const char* key, const char* value, void* context);
696     static void EnableSystemParameterDebugStatemgrCallback(const char* key, const char* value, void* context);
697     static void EnableSystemParameterDebugBoundaryCallback(const char* key, const char* value, void* context);
698     static void EnableSystemParameterPerformanceMonitorCallback(const char* key, const char* value, void* context);
699     static void OnFocusActiveChanged(const char* key, const char* value, void* context);
700     static float GetDefaultResolution();
701 
702     static void SetLayoutTraceEnabled(bool layoutTraceEnable);
703 
704     static void SetInputEventTraceEnabled(bool inputEventTraceEnable);
705 
706     static void SetSecurityDevelopermodeLayoutTraceEnabled(bool layoutTraceEnable);
707 
708     static void SetDebugBoundaryEnabled(bool debugBoundaryEnabled);
709 
710     static void SetPerformanceMonitorEnabled(bool performanceMonitorEnable);
711 
712     static void SetFocusCanBeActive(bool focusCanBeActive);
713 
GetAcePerformanceMonitorEnabled()714     static bool GetAcePerformanceMonitorEnabled()
715     {
716         return acePerformanceMonitorEnable_.load();
717     }
718 
GetFocusCanBeActive()719     static bool GetFocusCanBeActive()
720     {
721         return focusCanBeActive_.load();
722     }
723 
GetAceCommercialLogEnabled()724     static bool GetAceCommercialLogEnabled()
725     {
726         return aceCommercialLogEnable_;
727     }
728 
729     static std::string GetAtomicServiceBundleName();
730 
GetDarkModeBrightnessPercent()731     static std::pair<float, float> GetDarkModeBrightnessPercent()
732     {
733         return brightUpPercent_;
734     }
735 
GetPageCount()736     static float GetPageCount()
737     {
738         return pageCount_;
739     }
740 
741     static bool IsOpIncEnable();
742 
743     static float GetDragStartDampingRatio();
744 
745     static float GetDragStartPanDistanceThreshold();
746 
747     static int32_t GetVelocityTrackerPointNumber();
748 
749     static bool IsVelocityWithinTimeWindow();
750 
751     static bool IsVelocityWithoutUpPoint();
752 
753     static bool IsSmallFoldProduct();
754 
755     static bool IsBigFoldProduct();
756 
757     static std::string GetWebDebugRenderMode();
758 
759     static std::string GetDebugInspectorId();
760 
761     static double GetSrollableVelocityScale();
762 
763     static double GetSrollableFriction();
764 
765     static double GetScrollableDistance();
766 
767     static bool GetWebDebugMaximizeResizeOptimize();
768 
769     static bool IsNeedResampleTouchPoints();
770 
771     static bool IsNeedSymbol();
772 
773     static bool GetMultiInstanceEnabled();
774 
775     static void SetMultiInstanceEnabled(bool enabled);
776 
GetTaskPriorityAdjustmentEnable()777     static bool GetTaskPriorityAdjustmentEnable()
778     {
779         return taskPriorityAdjustmentEnable_;
780     }
781 
782     static int32_t GetDragDropFrameworkStatus();
783     static int32_t GetTouchAccelarate();
784 
785     static bool IsSuperFoldDisplayDevice();
786 
787     static bool IsPageTransitionFreeze();
788 
789     static bool IsSoftPageTransition();
790 
791     static bool IsFormSkeletonBlurEnabled();
792 
793     static int32_t getFormSharedImageCacheThreshold();
794 
795     static bool IsWhiteBlockEnabled();
796     static bool IsWhiteBlockIdleChange();
797     static int32_t GetWhiteBlockIndexValue();
798     static int32_t GetWhiteBlockCacheCountValue();
799 
GetWidthLayoutBreakpoints()800     static WidthLayoutBreakPoint GetWidthLayoutBreakpoints()
801     {
802         return widthLayoutBreakpoints_;
803     }
804 
GetHeightLayoutBreakpoints()805     static HeightLayoutBreakPoint GetHeightLayoutBreakpoints()
806     {
807         return heightLayoutBreakpoints_;
808     }
809 
IsSyncLoadEnabled()810     static bool IsSyncLoadEnabled()
811     {
812         return syncLoadEnabled_;
813     }
814 
815     static int32_t GetPreviewStatus();
816 
GetDebugThreadSafeNodeEnabled()817     static bool GetDebugThreadSafeNodeEnabled()
818     {
819         return debugThreadSafeNodeEnable_;
820     }
821 
GetPrebuildInMultiFrameEnabled()822     static bool GetPrebuildInMultiFrameEnabled()
823     {
824         return prebuildInMultiFrameEnabled_;
825     }
826 
827 private:
828     static bool opincEnabled_;
829     static bool developerModeOn_;
830     static bool svgTraceEnable_;
831     static std::atomic<bool> layoutTraceEnable_;
832     static std::atomic<bool> traceInputEventEnable_;
833     static bool buildTraceEnable_;
834     static bool dynamicDetectionTraceEnable_;
835     static bool cacheNavigationNodeEnable_;
836     static bool syncDebugTraceEnable_;
837     static bool measureDebugTraceEnable_;
838     static bool safeAreaDebugTraceEnable_;
839     static bool pixelRoundEnable_;
840     static bool textTraceEnable_;
841     static bool syntaxTraceEnable_;
842     static bool accessTraceEnable_;
843     static bool vsyncModeTraceEnable_;
844     static bool accessibilityEnabled_;
845     static uint32_t canvasDebugMode_;
846     static bool isRound_;
847     static bool isDeviceAccess_;
848     static int32_t deviceWidth_;
849     static int32_t deviceHeight_;
850     static int32_t devicePhysicalWidth_;
851     static int32_t devicePhysicalHeight_;
852     static double resolution_; // density of the default display
853     static DeviceType deviceType_;
854     static bool needAvoidWindow_;
855     static DeviceOrientation orientation_;
856     static std::string brand_;
857     static std::string manufacturer_;
858     static std::string model_;
859     static std::string product_;
860     static std::string apiVersion_;
861     static std::string releaseType_;
862     static std::string paramDeviceType_;
863     static int32_t mcc_;
864     static int32_t mnc_;
865     static ScreenShape screenShape_;
866     static LongScreenType LongScreen_;
867     static bool unZipHap_;
868     static bool rosenBackendEnabled_;
869     static bool windowAnimationEnabled_;
870     static bool debugEnabled_;
871     static std::string configDeviceType_;
872     static bool transformEnabled_;
873     static float scrollCoefficients_;
874     static DebugFlags debugFlags_;
875     static bool containerDeleteFlag_;
876     static bool layoutDetectEnabled_;
877     static std::atomic<bool> debugBoundaryEnabled_;
878     static bool debugAutoUIEnabled_; // for AutoUI Test
879     static bool debugOffsetLogEnabled_;
880     static bool downloadByNetworkEnabled_;
881     static bool recycleImageEnabled_;
882     static bool gpuUploadEnabled_;
883     static bool isHookModeEnabled_;
884     static bool astcEnabled_;
885     static int32_t astcMax_;
886     static int32_t astcPsnr_;
887     static bool imageFileCacheConvertAstc_;
888     static int32_t imageFileCacheConvertAstcThreshold_;
889     static bool extSurfaceEnabled_;
890     static uint32_t dumpFrameCount_;
891     static bool resourceDecoupling_;
892     static bool configChangePerform_;
893     static bool enableScrollableItemPool_;
894     static bool navigationBlurEnabled_;
895     static bool forceSplitIgnoreOrientationEnabled_;
896     static std::optional<bool> arkUIHookEnabled_;
897     static bool gridCacheEnabled_;
898     static bool gridIrregularLayoutEnable_;
899     static bool sideBarContainerBlurEnable_;
900     static std::atomic<bool> stateManagerEnable_;
901     static std::atomic<bool> acePerformanceMonitorEnable_;
902     static std::atomic<bool> focusCanBeActive_;
903     static bool aceCommercialLogEnable_;
904     static bool faultInjectEnabled_;
905     static bool imageFrameworkEnable_;
906     static float pageCount_;
907     static std::pair<float, float> brightUpPercent_;
908     static float dragStartDampingRatio_;
909     static float dragStartPanDisThreshold_;
910     static int32_t velocityTrackerPointNumber_ ;
911     static bool isVelocityWithinTimeWindow_;
912     static bool isVelocityWithoutUpPoint_;
913     static float fontScale_;
914     static float fontWeightScale_;
915     static bool windowRectResizeEnabled_;
916     static FoldScreenType foldScreenType_;
917     static double scrollableDistance_;
918     static bool taskPriorityAdjustmentEnable_;
919     static bool multiInstanceEnabled_;
920     static int32_t dragDropFrameworkStatus_;
921     static int32_t touchAccelarate_;
922     static bool pageTransitionFrzEnabled_;
923     static bool softPagetransition_;
924     static bool formSkeletonBlurEnabled_;
925     static int32_t formSharedImageCacheThreshold_;
926     static WidthLayoutBreakPoint widthLayoutBreakpoints_;
927     static HeightLayoutBreakPoint heightLayoutBreakpoints_;
928     static bool syncLoadEnabled_;
929     static bool whiteBlockEnabled_;
930     static int32_t previewStatus_;
931     static bool debugThreadSafeNodeEnable_;
932     static bool prebuildInMultiFrameEnabled_;
933 };
934 
935 } // namespace OHOS::Ace
936 
937 #endif // FOUNDATION_ACE_FRAMEWORKS_BASE_UTILS_SYSTEM_PROPERTIES_H
938