modify db backup code 2

Signed-off-by: 尹耀德 <yinyaode1@huawei.com>
Change-Id: Ibbe5e0adb7df1dbb60d83dcb5998908514bfb0da
This commit is contained in:
尹耀德 2024-03-13 16:52:00 +08:00
parent 516c7be882
commit 5e23b32f4e
4 changed files with 8 additions and 8 deletions

View File

@ -22,7 +22,7 @@
extern "C" {
#endif
bool SubscribeSystemAbility(OnPackageRemoved onPackageRemoved, OnUserRemoved onUserRemoved, OnScreenOff onScreenOff,
bool SubscribeSystemAbility(OnPackageRemoved onPackageRemoved, OnUserRemoved onUserRemoved, OnScreenOff onScreenOff,
OnCharging onCharging);
bool UnSubscribeSystemAbility(void);

View File

@ -27,7 +27,7 @@ typedef void (*OnCharging)(void);
extern "C" {
#endif
bool SubscribeSystemEvent(OnPackageRemoved onPackageRemoved, OnUserRemoved onUserRemoved, OnScreenOff onScreenOff,
bool SubscribeSystemEvent(OnPackageRemoved onPackageRemoved, OnUserRemoved onUserRemoved, OnScreenOff onScreenOff,
OnCharging onCharging);
bool UnSubscribeSystemEvent(void);

View File

@ -31,8 +31,8 @@ const int32_t RETRY_DURATION_US = 200 * 1000;
class SystemAbilityHandler : public OHOS::SystemAbilityStatusChangeStub {
public:
SystemAbilityHandler(OnPackageRemoved onPackageRemoved, OnUserRemoved onUserRemoved, OnScreenOff onScreenOff,
OnCharging onCharging) : onPackageRemoved(onPackageRemoved), onUserRemoved(onUserRemoved),
SystemAbilityHandler(OnPackageRemoved onPackageRemoved, OnUserRemoved onUserRemoved, OnScreenOff onScreenOff,
OnCharging onCharging) : onPackageRemoved(onPackageRemoved), onUserRemoved(onUserRemoved),
onScreenOff(onScreenOff), onCharging(onCharging) {};
~SystemAbilityHandler() = default;
void OnAddSystemAbility(int32_t systemAbilityId, const std::string &deviceId) override
@ -81,7 +81,7 @@ OHOS::sptr<OHOS::ISystemAbilityManager> GetSystemAbility(void)
OHOS::sptr<SystemAbilityHandler> abilityHandler;
} // namespace
bool SubscribeSystemAbility(OnPackageRemoved onPackageRemoved, OnUserRemoved onUserRemoved, OnScreenOff onScreenOff,
bool SubscribeSystemAbility(OnPackageRemoved onPackageRemoved, OnUserRemoved onUserRemoved, OnScreenOff onScreenOff,
OnCharging onCharging)
{
OHOS::sptr<OHOS::ISystemAbilityManager> samgrProxy = GetSystemAbility();

View File

@ -52,8 +52,8 @@ void HandlePackageRemoved(const OHOS::AAFwk::Want &want, bool isSandBoxApp, OnPa
class SystemEventHandler : public CommonEventSubscriber {
public:
explicit SystemEventHandler(const CommonEventSubscribeInfo &subscribeInfo, OnPackageRemoved onPackageRemoved,
OnUserRemoved onUserRemoved, OnScreenOff onScreenOff, OnCharging onCharging):
CommonEventSubscriber(subscribeInfo)
OnUserRemoved onUserRemoved, OnScreenOff onScreenOff, OnCharging onCharging)
: CommonEventSubscriber(subscribeInfo)
{
this->onPackageRemoved = onPackageRemoved;
this->onUserRemoved = onUserRemoved;
@ -100,7 +100,7 @@ private:
std::shared_ptr<SystemEventHandler> g_eventHandler = nullptr;
}
bool SubscribeSystemEvent(OnPackageRemoved onPackageRemoved, OnUserRemoved onUserRemoved, OnScreenOff onScreenOff,
bool SubscribeSystemEvent(OnPackageRemoved onPackageRemoved, OnUserRemoved onUserRemoved, OnScreenOff onScreenOff,
OnCharging onCharging)
{
MatchingSkills matchingSkills;