From 375eedb8be8e11d3781f0cc6540492ad60c66512 Mon Sep 17 00:00:00 2001 From: zero-cyc Date: Tue, 1 Mar 2022 14:49:18 +0800 Subject: [PATCH] chenlien@huawei.com Signed-off-by: zero-cyc Change-Id: Iea49ab0612728a49f9c7d0d8d17b7d211f114c57 --- frameworks/ans/dialog/dialog_ui/js/common/.gitkeep | 0 frameworks/ans/native/src/notification.cpp | 4 ++-- .../moduletest/mock/include/mock_bundle_manager.h | 6 +++--- .../ans/src/notification_preferences_database.cpp | 12 ++++++------ .../test/unittest/distributed_database_test.cpp | 2 +- .../distributed_notification_manager_test.cpp | 2 +- 6 files changed, 13 insertions(+), 13 deletions(-) delete mode 100644 frameworks/ans/dialog/dialog_ui/js/common/.gitkeep diff --git a/frameworks/ans/dialog/dialog_ui/js/common/.gitkeep b/frameworks/ans/dialog/dialog_ui/js/common/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/frameworks/ans/native/src/notification.cpp b/frameworks/ans/native/src/notification.cpp index 613c42646..9794e39bc 100644 --- a/frameworks/ans/native/src/notification.cpp +++ b/frameworks/ans/native/src/notification.cpp @@ -246,7 +246,7 @@ bool Notification::MarshallingBool(Parcel &parcel) const bool Notification::MarshallingString(Parcel &parcel) const { if (!parcel.WriteString(key_)) { - ANS_LOGE("Can't wirte key"); + ANS_LOGE("Can't write key"); return false; } @@ -258,7 +258,7 @@ bool Notification::MarshallingString(Parcel &parcel) const } if (!parcel.WriteString(deviceId_)) { - ANS_LOGE("Can't wirte deviceId"); + ANS_LOGE("Can't write deviceId"); return false; } diff --git a/frameworks/ans/test/moduletest/mock/include/mock_bundle_manager.h b/frameworks/ans/test/moduletest/mock/include/mock_bundle_manager.h index ce1ef007f..1c5a4eaa2 100644 --- a/frameworks/ans/test/moduletest/mock/include/mock_bundle_manager.h +++ b/frameworks/ans/test/moduletest/mock/include/mock_bundle_manager.h @@ -178,7 +178,7 @@ public: } /** * @brief Query the AbilityInfo by the given Want. - * @param want Indicates the infomation of the ability. + * @param want Indicates the information of the ability. * @param abilityInfo Indicates the obtained AbilityInfo object. * @return Returns true if the AbilityInfo is successfully obtained; returns false otherwise. */ @@ -449,11 +449,11 @@ public: return true; } /** - * @brief Dump the bundle informations with specifc flags. + * @brief Dump the bundle information with specific flags. * @param flag Indicates the information contained in the dump result. * @param bundleName Indicates the bundle name if needed. * @param userId Indicates the user ID. - * @param result Indicates the dump infomation result. + * @param result Indicates the dump information result. * @return Returns true if the dump result is successfully obtained; returns false otherwise. */ virtual bool DumpInfos( diff --git a/services/ans/src/notification_preferences_database.cpp b/services/ans/src/notification_preferences_database.cpp index 85c9643aa..039da83f5 100644 --- a/services/ans/src/notification_preferences_database.cpp +++ b/services/ans/src/notification_preferences_database.cpp @@ -442,7 +442,7 @@ bool NotificationPreferencesDatabase::PutDoNotDisturbDate( } void NotificationPreferencesDatabase::GetValueFromDisturbeDB( - const std::string &key, std::function funcion) + const std::string &key, std::function callback) { if (!CheckKvStore()) { ANS_LOGE("KvStore is nullptr."); @@ -454,19 +454,19 @@ void NotificationPreferencesDatabase::GetValueFromDisturbeDB( DistributedKv::Key getKey(key); status = kvStorePtr_->Get(getKey, value); if (status != DistributedKv::Status::SUCCESS) { - ANS_LOGE("Get value failed, use defalut value. error code is %{public}d", status); + ANS_LOGE("Get value failed, use default value. error code is %{public}d", status); return; } if (value.Empty()) { - ANS_LOGE("Get value is empty, use defalut value. error code is %{public}d", value.Empty()); + ANS_LOGE("Get value is empty, use default value. error code is %{public}d", value.Empty()); return; } - funcion(value); + callback(value); } void NotificationPreferencesDatabase::GetValueFromDisturbeDB( - const std::string &key, std::function funcion) + const std::string &key, std::function callback) { if (!CheckKvStore()) { ANS_LOGE("KvStore is nullptr."); @@ -477,7 +477,7 @@ void NotificationPreferencesDatabase::GetValueFromDisturbeDB( DistributedKv::Value value; DistributedKv::Key getKey(key); status = kvStorePtr_->Get(getKey, value); - funcion(status, value); + callback(status, value); } bool NotificationPreferencesDatabase::CheckBundle(const std::string &bundleName, const int &bundleUid) diff --git a/services/distributed/test/unittest/distributed_database_test.cpp b/services/distributed/test/unittest/distributed_database_test.cpp index f94a86995..0bd73d7fb 100644 --- a/services/distributed/test/unittest/distributed_database_test.cpp +++ b/services/distributed/test/unittest/distributed_database_test.cpp @@ -169,7 +169,7 @@ HWTEST_F(DistributedDatabaseTest, GetLocalDeviceId_00100, Function | SmallTest | /** * @tc.name : DistributedDatabase_GetLocalDeviceInfo_00100 * @tc.number : GetLocalDeviceInfo_00100 - * @tc.desc : Get local device infomation. + * @tc.desc : Get local device information. */ HWTEST_F(DistributedDatabaseTest, GetLocalDeviceInfo_00100, Function | SmallTest | Level1) { diff --git a/services/distributed/test/unittest/distributed_notification_manager_test.cpp b/services/distributed/test/unittest/distributed_notification_manager_test.cpp index c6cac5a4c..e4ab49cf0 100644 --- a/services/distributed/test/unittest/distributed_notification_manager_test.cpp +++ b/services/distributed/test/unittest/distributed_notification_manager_test.cpp @@ -173,7 +173,7 @@ HWTEST_F(DistributedNotificationManagerTest, Distributed_Get_Current_Notificatio /** * @tc.name : Distributed_Get_Local_DeviceInfo_00100 * @tc.number : Distributed_Get_Local_DeviceInfo_00100 - * @tc.desc : Get local distributed device infomation. + * @tc.desc : Get local distributed device information. */ HWTEST_F(DistributedNotificationManagerTest, Distributed_Get_Local_DeviceInfo_00100, Function | SmallTest | Level1) { -- Gitee