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()22BundleActiveOpenCallback::BundleActiveOpenCallback() : NativeRdb::RdbOpenCallback() 23 { 24 }; 25 ~BundleActiveOpenCallback()26BundleActiveOpenCallback::~BundleActiveOpenCallback() 27 { 28 }; 29 OnCreate(NativeRdb::RdbStore & rdbStore)30int32_t BundleActiveOpenCallback::OnCreate(NativeRdb::RdbStore &rdbStore) 31 { 32 BUNDLE_ACTIVE_LOGI("Create success."); 33 return NativeRdb::E_OK; 34 }; 35 OnUpgrade(NativeRdb::RdbStore & rdbStore,int32_t oldVersion,int32_t newVersion)36int32_t BundleActiveOpenCallback::OnUpgrade(NativeRdb::RdbStore &rdbStore, int32_t oldVersion, int32_t newVersion) 37 { 38 (void)rdbStore; 39 (void)oldVersion; 40 (void)newVersion; 41 BUNDLE_ACTIVE_LOGI("Upgrade success."); 42 return NativeRdb::E_OK; 43 }; 44 } // namespace DeviceUsageStats 45 } // namespace OHOS 46 47