diff --git a/frameworks/ans/core/src/ans_subscriber_stub.cpp b/frameworks/ans/core/src/ans_subscriber_stub.cpp index b2432c4c055671a2faabf803307d7ad2eb5c739a..932238a92000cf14a82eeab5bff1448ec901f131 100644 --- a/frameworks/ans/core/src/ans_subscriber_stub.cpp +++ b/frameworks/ans/core/src/ans_subscriber_stub.cpp @@ -13,7 +13,6 @@ * limitations under the License. */ - #include "ans_subscriber_stub.h" #include "ans_const_define.h" diff --git a/frameworks/ans/test/moduletest/mock/mock_bundle_manager.cpp b/frameworks/ans/test/moduletest/mock/mock_bundle_manager.cpp index 98fd912f35d5f6d390c92d69b070cc63c7eb10f8..4ee0032efcbee222a80e78a9c7d6bbe8734abaac 100644 --- a/frameworks/ans/test/moduletest/mock/mock_bundle_manager.cpp +++ b/frameworks/ans/test/moduletest/mock/mock_bundle_manager.cpp @@ -19,7 +19,6 @@ namespace OHOS { namespace AppExecFwk { - constexpr int SYSTEM_APP_UUID = 1000; void MockBundleMgrService::MockSetIsSystemApp(bool isSystemApp) diff --git a/frameworks/ans/test/moduletest/mock/mock_event_handler.cpp b/frameworks/ans/test/moduletest/mock/mock_event_handler.cpp index bbbeb490708bddfb63b3f0cfee26529eac2bd62b..bdadec57f26576acc46f36a40b3fe23500357140 100644 --- a/frameworks/ans/test/moduletest/mock/mock_event_handler.cpp +++ b/frameworks/ans/test/moduletest/mock/mock_event_handler.cpp @@ -18,7 +18,6 @@ namespace OHOS { namespace AppExecFwk { - std::shared_ptr EventHandler::Current() { const std::weak_ptr &wp = std::make_shared(EventRunner::Create(true)); diff --git a/interfaces/innerkits/wantagent/include/cancel_listener.h b/interfaces/innerkits/wantagent/include/cancel_listener.h index 10cea7b5f323829d6d959f3b0594a985e0a2a253..cb3a24495a6fc0503f5ed214900ed5397fd5e276 100644 --- a/interfaces/innerkits/wantagent/include/cancel_listener.h +++ b/interfaces/innerkits/wantagent/include/cancel_listener.h @@ -18,12 +18,12 @@ namespace OHOS::Notification::WantAgent { class CancelListener { +public: /** * Called when a Cancel operation as completed. * * @param resultCode The final result code determined by the Send. */ -public: virtual void OnCancelled(int resultCode) = 0; virtual ~CancelListener() = default; }; diff --git a/interfaces/innerkits/wantagent/include/completed_callback.h b/interfaces/innerkits/wantagent/include/completed_callback.h index 5b83a2dc479c0f81178ccf1b8150cc6a95de0b24..5657c86b43e504b5123cc063d4a94e1e85c6a97e 100644 --- a/interfaces/innerkits/wantagent/include/completed_callback.h +++ b/interfaces/innerkits/wantagent/include/completed_callback.h @@ -23,6 +23,8 @@ namespace OHOS::Notification::WantAgent { class CompletedCallback { +public: + virtual ~CompletedCallback() = default; /** * Called when a Send operation as completed. * @@ -31,8 +33,6 @@ class CompletedCallback { * @param resultData The final data collected by a broadcast. * @param resultExtras The final extras collected by a broadcast. */ -public: - virtual ~CompletedCallback() = default; virtual void OnSendFinished(const AAFwk::Want &want, int resultCode, const std::string &resultData, const AAFwk::WantParams &resultExtras) = 0; }; diff --git a/interfaces/innerkits/wantagent/include/trigger_info.h b/interfaces/innerkits/wantagent/include/trigger_info.h index ba4cdba4e9e7de4c2aa35359811ee45f705cbf12..a41ba98ec90d32ec6bd780fdd2cc1f7d18722151 100644 --- a/interfaces/innerkits/wantagent/include/trigger_info.h +++ b/interfaces/innerkits/wantagent/include/trigger_info.h @@ -23,11 +23,11 @@ namespace OHOS::Notification::WantAgent { class TriggerInfo final : public std::enable_shared_from_this { +public: /** * Default constructor used to create a {@code TriggerInfo} instance. * */ -public: TriggerInfo(); virtual ~TriggerInfo() = default; @@ -100,11 +100,11 @@ public: */ public: class Builder final : public std::enable_shared_from_this { + public: /** * Default constructor used to create a {@code Builder} instance. * */ - public: Builder(); virtual ~Builder() = default; diff --git a/interfaces/innerkits/wantagent/include/want_agent.h b/interfaces/innerkits/wantagent/include/want_agent.h index f9a19087ed996fe774d20a1658f736d1e141dfde..3af5ac876e678926e32501133313fb18c47b11a8 100644 --- a/interfaces/innerkits/wantagent/include/want_agent.h +++ b/interfaces/innerkits/wantagent/include/want_agent.h @@ -28,6 +28,11 @@ class WantAgent final : public std::enable_shared_from_this, public P public: WantAgent() {}; virtual ~WantAgent() = default; + /** + * Constructor. + * + * @param obj The proxy object. + */ explicit WantAgent(const std::shared_ptr &pendingWant); /** @@ -40,7 +45,7 @@ public: /** * Sets proxy obj. * - * @return Return obj. + * @param obj The proxy object. */ void SetPendingWant(const std::shared_ptr &pendingWant); @@ -62,12 +67,6 @@ public: private: std::shared_ptr pendingWant_; - - /** - * Constructor. - * - * @param obj The proxy object. - */ }; } // namespace OHOS::Notification::WantAgent #endif // BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_WANTAGENT_INCLUDE_WANT_AGENT_H \ No newline at end of file diff --git a/interfaces/innerkits/wantagent/include/want_agent_info.h b/interfaces/innerkits/wantagent/include/want_agent_info.h index c363784a142dd41d4a28238291aad733a1eee361..70315d122c3c3124d02ca7827586f99a43799054 100644 --- a/interfaces/innerkits/wantagent/include/want_agent_info.h +++ b/interfaces/innerkits/wantagent/include/want_agent_info.h @@ -32,11 +32,11 @@ namespace OHOS::Notification::WantAgent { * */ class WantAgentInfo final : public std::enable_shared_from_this { +public: /** * Default constructor used to create an empty WantAgentInfo instance. * */ -public: WantAgentInfo(); virtual ~WantAgentInfo() = default; diff --git a/interfaces/kits/napi/ans/BUILD.gn b/interfaces/kits/napi/ans/BUILD.gn index 2d7176e35e9c49e5eacec5217b237e444765318d..66da3426a486297d57cb9acd3d81ee3cc83b3d9a 100644 --- a/interfaces/kits/napi/ans/BUILD.gn +++ b/interfaces/kits/napi/ans/BUILD.gn @@ -61,6 +61,8 @@ ohos_shared_library("notification") { "src/unsubscribe.cpp", ] + ldflags = [ "-Wl,-rpath=/system/lib/module/multimedia/" ] + deps = [ "${frameworks_path}/ans/core:ans_core", "${frameworks_path}/ans/native:ans_innerkits", diff --git a/interfaces/kits/napi/ans/include/unsubscribe.h b/interfaces/kits/napi/ans/include/unsubscribe.h index 2751b461b28b4958c62775cda6deabb88c919aac..670b257aecd3e64887211eef15151a25e0d6bb5d 100644 --- a/interfaces/kits/napi/ans/include/unsubscribe.h +++ b/interfaces/kits/napi/ans/include/unsubscribe.h @@ -22,7 +22,6 @@ namespace OHOS { namespace NotificationNapi { using namespace OHOS::Notification; napi_value Unsubscribe(napi_env env, napi_callback_info info); - } // namespace NotificationNapi } // namespace OHOS diff --git a/services/ans/src/notification_preferences_database.cpp b/services/ans/src/notification_preferences_database.cpp index 54c5a1e5402796abd64c5d94cd45fb9ac100b821..809f7f71ae6263bd27e01f9c5e4c2672ecf64ec1 100644 --- a/services/ans/src/notification_preferences_database.cpp +++ b/services/ans/src/notification_preferences_database.cpp @@ -14,7 +14,6 @@ */ #include "notification_preferences_database.h" - #include "ans_log_wrapper.h" #include "uri.h" diff --git a/services/ans/test/unittest/mock/mock_bundle_manager_helper.cpp b/services/ans/test/unittest/mock/mock_bundle_manager_helper.cpp index 0d454850b26a4d203d3766df6b63a7bc524e0067..f124d5004411ab9a3a827b4f3b439aff97b7148d 100644 --- a/services/ans/test/unittest/mock/mock_bundle_manager_helper.cpp +++ b/services/ans/test/unittest/mock/mock_bundle_manager_helper.cpp @@ -45,6 +45,7 @@ bool BundleManagerHelper::IsSystemApp(int uid) { return (uid == SYSTEM_APP_UID); } + void BundleManagerHelper::Connect() {} diff --git a/services/ans/test/unittest/mock/mock_single_kv_store.cpp b/services/ans/test/unittest/mock/mock_single_kv_store.cpp index bc79b1906abc1e2fef3eccc0efe1c24426bd0a35..e246e8d9931ca3446ffcb3c9ab9d75f2091c80b8 100644 --- a/services/ans/test/unittest/mock/mock_single_kv_store.cpp +++ b/services/ans/test/unittest/mock/mock_single_kv_store.cpp @@ -18,7 +18,6 @@ namespace OHOS { namespace DistributedKv { - Status AnsTestSingleKvStore::GetEntries(const Key &prefixKey, std::vector &entries) const { return Status::SUCCESS; diff --git a/services/test/moduletest/mock/mock_bundle_manager.cpp b/services/test/moduletest/mock/mock_bundle_manager.cpp index 98d2bcac2bffedb17ad498ddcb7ed15c1b78b2cb..cdb047eceb67099cb8db3c1339f4e0fbcbfe6dc4 100644 --- a/services/test/moduletest/mock/mock_bundle_manager.cpp +++ b/services/test/moduletest/mock/mock_bundle_manager.cpp @@ -19,7 +19,6 @@ namespace OHOS { namespace AppExecFwk { - constexpr int SYSTEMAPP_UUID = 1000; void MockBundleMgrService::MockSetIsSystemApp(bool isSystemApp) diff --git a/services/test/moduletest/mock/mock_bundle_manager_helper.cpp b/services/test/moduletest/mock/mock_bundle_manager_helper.cpp index 5fef8d274b4e69d4419e24f95d9771b499194d06..70406de1d4b1be368e3aabad9393e3e451ccdb84 100644 --- a/services/test/moduletest/mock/mock_bundle_manager_helper.cpp +++ b/services/test/moduletest/mock/mock_bundle_manager_helper.cpp @@ -45,6 +45,5 @@ void BundleManagerHelper::Connect() void BundleManagerHelper::Disconnect() {} - } // namespace Notification } // namespace OHOS \ No newline at end of file diff --git a/services/test/moduletest/mock/mock_event_handler.cpp b/services/test/moduletest/mock/mock_event_handler.cpp index bbbeb490708bddfb63b3f0cfee26529eac2bd62b..bdadec57f26576acc46f36a40b3fe23500357140 100644 --- a/services/test/moduletest/mock/mock_event_handler.cpp +++ b/services/test/moduletest/mock/mock_event_handler.cpp @@ -18,7 +18,6 @@ namespace OHOS { namespace AppExecFwk { - std::shared_ptr EventHandler::Current() { const std::weak_ptr &wp = std::make_shared(EventRunner::Create(true)); diff --git a/services/test/moduletest/mock/mock_single_kv_store.cpp b/services/test/moduletest/mock/mock_single_kv_store.cpp index bc79b1906abc1e2fef3eccc0efe1c24426bd0a35..e246e8d9931ca3446ffcb3c9ab9d75f2091c80b8 100644 --- a/services/test/moduletest/mock/mock_single_kv_store.cpp +++ b/services/test/moduletest/mock/mock_single_kv_store.cpp @@ -18,7 +18,6 @@ namespace OHOS { namespace DistributedKv { - Status AnsTestSingleKvStore::GetEntries(const Key &prefixKey, std::vector &entries) const { return Status::SUCCESS; diff --git a/tools/dump/src/main.cpp b/tools/dump/src/main.cpp index b9557ac51c1a3fe359a78b965912b63a95621260..b5ea1058ddebca6ae075b861b6576edbc9cd87cc 100644 --- a/tools/dump/src/main.cpp +++ b/tools/dump/src/main.cpp @@ -13,7 +13,6 @@ * limitations under the License. */ - #include "notification_shell_command.h" int main(int argc, char *argv[])