• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 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 #ifndef FOUNDATION_APPEXECFWK_SERVICES_BUNDLEMGR_INCLUDE_AGING_CONSTANTS_H
17 #define FOUNDATION_APPEXECFWK_SERVICES_BUNDLEMGR_INCLUDE_AGING_CONSTANTS_H
18 
19 #include <string>
20 
21 namespace OHOS {
22 namespace AppExecFwk {
23 namespace AgingConstants {
24 const std::string SYSTEM_PARAM_DATA_SIZE_THRESHOLD = "persist.sys.bms.aging.policy.data.size.threshold";
25 const std::string SYSTEM_PARAM_RECENILY_USED_THRESHOLD = "persist.sys.bms.aging.policy.recently.used.threshold";
26 const std::string SYSTEM_PARAM_AGING_TIMER_INTERVAL = "persist.sys.bms.aging.policy.timer.interval";
27 const std::string SYSTEM_PARAM_AGING_BATTER_THRESHOLD = "persist.sys.bms.aging.policy.battery.threshold";
28 const int64_t ONE_SECOND_MS = 1000;
29 const float AGING_SIZE_RATIO = 0.8F;
30 const int64_t ONE_HOUR_MS = (int64_t)60 * 60 * ONE_SECOND_MS;
31 const int64_t DEFAULT_AGING_TIMER_INTERVAL = (int64_t)8 * ONE_HOUR_MS;
32 const int64_t ONE_DAYS_MS = (int64_t)24 * ONE_HOUR_MS;
33 const int64_t ONE_KB = (int64_t)1024;
34 const int64_t ONE_MB = (int64_t)1024 * ONE_KB;
35 const int64_t DEFAULT_AGING_DATA_SIZE_THRESHOLD = (int64_t)500 * ONE_MB;
36 const int64_t DEFAULT_AGING_BATTERY_THRESHOLD = (int64_t)10;
37 const int64_t THRESHOLD_VAL_LEN = 20;
38 const int32_t TIME_30_DAYS = 30;
39 const int32_t TIME_20_DAYS = 20;
40 const int32_t TIME_10_DAYS = 10;
41 const int32_t COUNT_MODULE_RECODES_GET = 1000;
42 
43 const std::string AGING_THREAD = "AgingThread";
44 
45 const std::string UNUSED_FOR_30_DAYS_BUNDLE_AGING_HANDLER = "UnusedFor30DaysBundleAgingHandler";
46 const std::string UNUSED_FOR_20_DAYS_BUNDLE_AGING_HANDLER = "UnusedFor20DaysBundleAgingHandler";
47 const std::string UNUSED_FOR_10_DAYS_BUNDLE_AGING_HANDLER = "UnusedFor10DaysBundleAgingHandler";
48 const std::string BUNDLE_DATA_SIZE_AGING_HANDLER = "BundleDataSizeAgingHandler";
49 }  // namespace AgingConstants
50 }  // namespace AppExecFwk
51 }  // namespace OHOS
52 #endif  // FOUNDATION_APPEXECFWK_SERVICES_BUNDLEMGR_INCLUDE_AGING_CONSTANTS_H
53