• 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 #include "bundle_active_open_callback.h"
17 #include "bundle_active_log.h"
18 #include "bundle_active_constant.h"
19 
20 namespace OHOS {
21 namespace DeviceUsageStats {
BundleActiveOpenCallback()22 BundleActiveOpenCallback::BundleActiveOpenCallback() : NativeRdb::RdbOpenCallback()
23 {
24 };
25 
26 // LCOV_EXCL_START
~BundleActiveOpenCallback()27 BundleActiveOpenCallback::~BundleActiveOpenCallback()
28 {
29 };
30 // LCOV_EXCL_STOP
31 
OnCreate(NativeRdb::RdbStore & rdbStore)32 int32_t BundleActiveOpenCallback::OnCreate(NativeRdb::RdbStore &rdbStore)
33 {
34     BUNDLE_ACTIVE_LOGI("Create success.");
35     return NativeRdb::E_OK;
36 };
37 // LCOV_EXCL_START
OnUpgrade(NativeRdb::RdbStore & rdbStore,int32_t oldVersion,int32_t newVersion)38 int32_t BundleActiveOpenCallback::OnUpgrade(NativeRdb::RdbStore &rdbStore, int32_t oldVersion, int32_t newVersion)
39 {
40     (void)rdbStore;
41     (void)oldVersion;
42     (void)newVersion;
43     BUNDLE_ACTIVE_LOGI("Upgrade success.");
44     return NativeRdb::E_OK;
45 };
46 // LCOV_EXCL_STOP
47 }  // namespace DeviceUsageStats
48 }  // namespace OHOS
49 
50