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 int64_t ONE_SECOND_MS = 1000; 25 const float AGING_SIZE_RATIO = 0.8F; 26 const int64_t ONE_HOUR_MS = (int64_t)60 * 60 * ONE_SECOND_MS; 27 const int64_t DEFAULT_AGING_TIMER_INTERVAL = (int64_t)8 * ONE_HOUR_MS; 28 const int64_t ONE_DAYS_MS = (int64_t)24 * ONE_HOUR_MS; 29 const int64_t ONE_KB = (int64_t)1024; 30 const int64_t ONE_MB = (int64_t)1024 * ONE_KB; 31 const int64_t DEFAULT_AGING_DATA_SIZE_THRESHOLD = (int64_t)500 * ONE_MB; 32 const int64_t DEFAULT_AGING_BATTERY_THRESHOLD = (int64_t)10; 33 const int64_t THRESHOLD_VAL_LEN = 20; 34 const int32_t TIME_30_DAYS = 30; 35 const int32_t TIME_20_DAYS = 20; 36 const int32_t TIME_10_DAYS = 10; 37 const int32_t COUNT_MODULE_RECODES_GET = 1000; 38 } // namespace AgingConstants 39 } // namespace AppExecFwk 40 } // namespace OHOS 41 #endif // FOUNDATION_APPEXECFWK_SERVICES_BUNDLEMGR_INCLUDE_AGING_CONSTANTS_H 42