From fa28aa5f3c7689fc56a6bb4af83a56075d60c4bc Mon Sep 17 00:00:00 2001 From: houdisheng Date: Mon, 21 Mar 2022 11:40:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8C=E6=AD=A5=E4=B8=BB=E5=B9=B2=E5=86=85?= =?UTF-8?q?=E6=BA=90=E6=A3=80=E8=A7=86issue=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: houdisheng --- frameworks/src/bundle_state_common.cpp | 3 ++- frameworks/src/bundle_state_init.cpp | 3 ++- frameworks/src/bundle_state_query.cpp | 3 ++- interfaces/innerkits/include/bundle_active_client.h | 9 +++++---- interfaces/innerkits/include/bundle_active_proxy.h | 7 ++++--- interfaces/innerkits/src/bundle_active_client.cpp | 6 ++++-- interfaces/innerkits/src/bundle_active_proxy.cpp | 6 ++++-- .../kits/bundlestats/js/@ohos.bundleState.d.ts | 3 ++- .../bundlestats/napi/include/bundle_state_common.h | 3 ++- .../napi/include/bundle_state_condition.h | 3 ++- .../bundlestats/napi/include/bundle_state_data.h | 1 + .../bundlestats/napi/include/bundle_state_init.h | 3 ++- .../napi/include/bundle_state_inner_errors.h | 3 ++- .../bundlestats/napi/include/bundle_state_query.h | 3 ++- .../device_usage_statistics_jsunit.test.js | 9 +++++---- .../include/bundle_active_app_state_observer.h | 7 ++++--- .../common/include/bundle_active_binary_search.h | 7 ++++--- .../include/bundle_active_common_event_subscriber.h | 9 +++++---- services/common/include/bundle_active_constant.h | 3 ++- .../bundle_active_continuous_task_observer.h | 7 ++++--- services/common/include/bundle_active_core.h | 9 +++++---- services/common/include/bundle_active_debug_mode.h | 7 ++++--- services/common/include/bundle_active_log.h | 2 +- .../common/include/bundle_active_open_callback.h | 7 ++++--- services/common/include/bundle_active_service.h | 7 ++++--- .../include/bundle_active_shutdown_callback_proxy.h | 7 ++++--- .../bundle_active_shutdown_callback_service.h | 9 +++++---- .../include/bundle_active_shutdown_callback_stub.h | 6 +++--- services/common/include/bundle_active_stub.h | 13 +++++++------ .../common/include/bundle_active_usage_database.h | 7 ++++--- services/common/include/ibundle_active_service.h | 7 ++++--- .../common/src/bundle_active_app_state_obsever.cpp | 5 +++-- services/common/src/bundle_active_binary_search.cpp | 5 +++-- .../src/bundle_active_continuous_task_observer.cpp | 5 +++-- services/common/src/bundle_active_core.cpp | 5 +++-- services/common/src/bundle_active_debug_mode.cpp | 5 +++-- services/common/src/bundle_active_log.cpp | 1 + services/common/src/bundle_active_open_callback.cpp | 3 ++- services/common/src/bundle_active_service.cpp | 5 +++-- .../src/bundle_active_shutdown_callback_proxy.cpp | 5 +++-- .../src/bundle_active_shutdown_callback_service.cpp | 6 ++++-- .../src/bundle_active_shutdown_callback_stub.cpp | 5 +++-- services/common/src/bundle_active_stub.cpp | 5 +++-- .../common/src/bundle_active_usage_database.cpp | 5 +++-- .../include/bundle_active_group_common.h | 7 ++++--- .../include/bundle_active_group_controller.h | 8 ++++---- .../include/bundle_active_group_handler.h | 9 +++++---- .../include/bundle_active_package_history.h | 9 +++++---- .../include/bundle_active_user_history.h | 7 ++++--- .../src/bundle_active_group_controller.cpp | 5 +++-- .../src/bundle_active_group_handler.cpp | 5 +++-- .../packagegroup/src/bundle_active_user_history.cpp | 5 +++-- .../packageusage/include/bundle_active_calendar.h | 7 ++++--- services/packageusage/include/bundle_active_event.h | 7 ++++--- .../packageusage/include/bundle_active_event_list.h | 9 +++++---- .../include/bundle_active_event_stats.h | 7 ++++--- .../include/bundle_active_event_tracker.h | 7 ++++--- .../include/bundle_active_package_stats.h | 13 +++++++------ .../include/bundle_active_period_stats.h | 7 ++++--- .../include/bundle_active_report_handler.h | 7 ++++--- .../include/bundle_active_stats_combiner.h | 7 ++++--- .../include/bundle_active_stats_update_listener.h | 7 ++++--- .../include/bundle_active_user_service.h | 9 +++++---- .../packageusage/src/bundle_active_calendar.cpp | 5 +++-- services/packageusage/src/bundle_active_event.cpp | 5 +++-- .../packageusage/src/bundle_active_event_list.cpp | 5 +++-- .../packageusage/src/bundle_active_event_stats.cpp | 5 +++-- .../src/bundle_active_event_tracker.cpp | 5 +++-- .../src/bundle_active_package_stats.cpp | 5 +++-- .../packageusage/src/bundle_active_period_stats.cpp | 5 +++-- .../src/bundle_active_report_handler.cpp | 5 +++-- .../src/bundle_active_stats_combiner.cpp | 5 +++-- .../packageusage/src/bundle_active_user_service.cpp | 5 +++-- test/unittest/device_usage_statistics_test.cpp | 5 +++-- 74 files changed, 255 insertions(+), 181 deletions(-) diff --git a/frameworks/src/bundle_state_common.cpp b/frameworks/src/bundle_state_common.cpp index 67e69c0..26ba1cb 100644 --- a/frameworks/src/bundle_state_common.cpp +++ b/frameworks/src/bundle_state_common.cpp @@ -285,4 +285,5 @@ void BundleStateCommon::MergePackageStats(BundleActivePackageStats &left, const left.bundleStartedCount_ += right.bundleStartedCount_; } } // namespace DeviceUsageStats -} // namespace OHOS \ No newline at end of file +} // namespace OHOS + diff --git a/frameworks/src/bundle_state_init.cpp b/frameworks/src/bundle_state_init.cpp index acffa11..3e7955d 100644 --- a/frameworks/src/bundle_state_init.cpp +++ b/frameworks/src/bundle_state_init.cpp @@ -108,4 +108,5 @@ __attribute__((constructor)) void RegisterModule(void) } EXTERN_C_END } // namespace DeviceUsageStats -} // namespace OHOS \ No newline at end of file +} // namespace OHOS + diff --git a/frameworks/src/bundle_state_query.cpp b/frameworks/src/bundle_state_query.cpp index 59bf313..35ae3d8 100644 --- a/frameworks/src/bundle_state_query.cpp +++ b/frameworks/src/bundle_state_query.cpp @@ -646,4 +646,5 @@ napi_value QueryBundleStateInfos(napi_env env, napi_callback_info info) } } } // namespace DeviceUsageStats -} // namespace OHOS \ No newline at end of file +} // namespace OHOS + diff --git a/interfaces/innerkits/include/bundle_active_client.h b/interfaces/innerkits/include/bundle_active_client.h index d14ef81..5bf1e97 100644 --- a/interfaces/innerkits/include/bundle_active_client.h +++ b/interfaces/innerkits/include/bundle_active_client.h @@ -37,12 +37,13 @@ public: int QueryPackageGroup(); static BundleActiveClient& GetInstance(); BundleActiveClient() {} - ~BundleActiveClient() {}; + ~BundleActiveClient() {} private: bool GetBundleActiveProxy(); sptr bundleActiveProxy_; }; -} -} -#endif \ No newline at end of file +} // namespace DeviceUsageStats +} // namespace OHOS +#endif // BUNDLE_ACTIVE_CLIENT_H + diff --git a/interfaces/innerkits/include/bundle_active_proxy.h b/interfaces/innerkits/include/bundle_active_proxy.h index 2508e26..e5fe92e 100644 --- a/interfaces/innerkits/include/bundle_active_proxy.h +++ b/interfaces/innerkits/include/bundle_active_proxy.h @@ -42,6 +42,7 @@ public: private: static inline BrokerDelegator delegator_; }; -} -} -#endif +} // namespace DeviceUsageStats +} // namespace OHOS +#endif // BUNDLE_ACTIVE_PROXY_H + diff --git a/interfaces/innerkits/src/bundle_active_client.cpp b/interfaces/innerkits/src/bundle_active_client.cpp index 32fbbea..be85a66 100644 --- a/interfaces/innerkits/src/bundle_active_client.cpp +++ b/interfaces/innerkits/src/bundle_active_client.cpp @@ -115,5 +115,7 @@ int BundleActiveClient::QueryPackageGroup() } return bundleActiveProxy_->QueryPackageGroup(); } -} -} \ No newline at end of file +} // namespace DeviceUsageStats +} // namespace OHOS +#endif // BUNDLE_ACTIVE_PROXY_H + diff --git a/interfaces/innerkits/src/bundle_active_proxy.cpp b/interfaces/innerkits/src/bundle_active_proxy.cpp index 21aef49..0010086 100644 --- a/interfaces/innerkits/src/bundle_active_proxy.cpp +++ b/interfaces/innerkits/src/bundle_active_proxy.cpp @@ -210,5 +210,7 @@ int BundleActiveProxy::QueryPackageGroup() BUNDLE_ACTIVE_LOGI("QueryPackageGroup result is %{public}d", packageGroup); return packageGroup; } -} -} \ No newline at end of file +} // namespace DeviceUsageStats +} // namespace OHOS +#endif // BUNDLE_ACTIVE_PROXY_H + diff --git a/interfaces/kits/bundlestats/js/@ohos.bundleState.d.ts b/interfaces/kits/bundlestats/js/@ohos.bundleState.d.ts index 0ca19c6..897f491 100644 --- a/interfaces/kits/bundlestats/js/@ohos.bundleState.d.ts +++ b/interfaces/kits/bundlestats/js/@ohos.bundleState.d.ts @@ -246,4 +246,5 @@ declare namespace bundleState { function queryCurrentBundleActiveStates(begin: number, end: number): Promise>; } -export default bundleState; \ No newline at end of file +export default bundleState; + diff --git a/interfaces/kits/bundlestats/napi/include/bundle_state_common.h b/interfaces/kits/bundlestats/napi/include/bundle_state_common.h index f8c7844..481f3b8 100644 --- a/interfaces/kits/bundlestats/napi/include/bundle_state_common.h +++ b/interfaces/kits/bundlestats/napi/include/bundle_state_common.h @@ -71,4 +71,5 @@ public: }; } // namespace DeviceUsageStats } // namespace OHOS -#endif // FOUNDATION_RESOURCESCHEDULE_DEVICE_USAGE_STATISTICS_BUNDLE_STATE_COMMON_H \ No newline at end of file +#endif // FOUNDATION_RESOURCESCHEDULE_DEVICE_USAGE_STATISTICS_BUNDLE_STATE_COMMON_H + diff --git a/interfaces/kits/bundlestats/napi/include/bundle_state_condition.h b/interfaces/kits/bundlestats/napi/include/bundle_state_condition.h index 9edd86e..eb4dc7a 100644 --- a/interfaces/kits/bundlestats/napi/include/bundle_state_condition.h +++ b/interfaces/kits/bundlestats/napi/include/bundle_state_condition.h @@ -33,4 +33,5 @@ public: }; } // namespace DeviceUsageStats } // namespace OHOS -#endif // FOUNDATION_RESOURCESCHEDULE_DEVICE_USAGE_STATISTICS_BUNDLE_STATE_CONDITION_H \ No newline at end of file +#endif // FOUNDATION_RESOURCESCHEDULE_DEVICE_USAGE_STATISTICS_BUNDLE_STATE_CONDITION_H + diff --git a/interfaces/kits/bundlestats/napi/include/bundle_state_data.h b/interfaces/kits/bundlestats/napi/include/bundle_state_data.h index 5d4f565..428c4ed 100644 --- a/interfaces/kits/bundlestats/napi/include/bundle_state_data.h +++ b/interfaces/kits/bundlestats/napi/include/bundle_state_data.h @@ -128,3 +128,4 @@ struct AppUsageParamsInfo { } // namespace DeviceUsageStats } // namespace OHOS #endif // FOUNDATION_RESOURCESCHEDULE_DEVICE_USAGE_STATISTICS_BUNDLE_STATE_DATA_H + diff --git a/interfaces/kits/bundlestats/napi/include/bundle_state_init.h b/interfaces/kits/bundlestats/napi/include/bundle_state_init.h index 432c2ab..7ac5260 100644 --- a/interfaces/kits/bundlestats/napi/include/bundle_state_init.h +++ b/interfaces/kits/bundlestats/napi/include/bundle_state_init.h @@ -48,4 +48,5 @@ napi_module _module = { }; } // namespace DeviceUsageStats } // namespace OHOS -#endif // FOUNDATION_RESOURCESCHEDULE_DEVICE_USAGE_STATISTICS_BUNDLE_STATE_INIT_H \ No newline at end of file +#endif // FOUNDATION_RESOURCESCHEDULE_DEVICE_USAGE_STATISTICS_BUNDLE_STATE_INIT_H + diff --git a/interfaces/kits/bundlestats/napi/include/bundle_state_inner_errors.h b/interfaces/kits/bundlestats/napi/include/bundle_state_inner_errors.h index 6d568f2..e4de782 100644 --- a/interfaces/kits/bundlestats/napi/include/bundle_state_inner_errors.h +++ b/interfaces/kits/bundlestats/napi/include/bundle_state_inner_errors.h @@ -52,4 +52,5 @@ enum : int { }; } // namespace DeviceUsageStats } // namespace OHOS -#endif // FOUNDATION_RESOURCESCHEDULE_DEVICE_USAGE_STATISTICS_BUNDLE_STATE_INNER_ERRORS_H \ No newline at end of file +#endif // FOUNDATION_RESOURCESCHEDULE_DEVICE_USAGE_STATISTICS_BUNDLE_STATE_INNER_ERRORS_H + diff --git a/interfaces/kits/bundlestats/napi/include/bundle_state_query.h b/interfaces/kits/bundlestats/napi/include/bundle_state_query.h index 589ebbe..f893d7c 100644 --- a/interfaces/kits/bundlestats/napi/include/bundle_state_query.h +++ b/interfaces/kits/bundlestats/napi/include/bundle_state_query.h @@ -29,4 +29,5 @@ namespace DeviceUsageStats { napi_value QueryBundleStateInfos(napi_env env, napi_callback_info info); } // namespace DeviceUsageStats } // namespace OHOS -#endif // FOUNDATION_RESOURCESCHEDULE_DEVICE_USAGE_STATISTICS_BUNDLE_STATE_QUERY_H \ No newline at end of file +#endif // FOUNDATION_RESOURCESCHEDULE_DEVICE_USAGE_STATISTICS_BUNDLE_STATE_QUERY_H + diff --git a/interfaces/test/unittest/device_usage_statistics_jsunittest/device_usage_statistics_jsunit.test.js b/interfaces/test/unittest/device_usage_statistics_jsunittest/device_usage_statistics_jsunit.test.js index 2b3c15c..daf50ba 100644 --- a/interfaces/test/unittest/device_usage_statistics_jsunittest/device_usage_statistics_jsunit.test.js +++ b/interfaces/test/unittest/device_usage_statistics_jsunittest/device_usage_statistics_jsunit.test.js @@ -24,21 +24,21 @@ describe("DeviceUsageStatisticsJsTest", function () { */ console.info('beforeAll called') }) - + afterAll(function() { /* * @tc.teardown: teardown invoked after all testcases */ console.info('afterAll called') }) - + beforeEach(function() { /* * @tc.setup: setup invoked before each testcases */ console.info('beforeEach called') }) - + afterEach(function() { /* * @tc.teardown: teardown invoked after each testcases @@ -329,4 +329,5 @@ describe("DeviceUsageStatisticsJsTest", function () { done(); }, 500); }) -}) \ No newline at end of file +}) + diff --git a/services/common/include/bundle_active_app_state_observer.h b/services/common/include/bundle_active_app_state_observer.h index 5e6d183..97131a7 100644 --- a/services/common/include/bundle_active_app_state_observer.h +++ b/services/common/include/bundle_active_app_state_observer.h @@ -56,6 +56,7 @@ private: } std::shared_ptr reportHandler_; }; -} -} -#endif \ No newline at end of file +} // namespace DeviceUsageStats +} // namespace OHOS +#endif // BUNDLE_ACTIVE_APP_STATE_OBSERVER_H + diff --git a/services/common/include/bundle_active_binary_search.h b/services/common/include/bundle_active_binary_search.h index 62bcfdc..c75e569 100644 --- a/services/common/include/bundle_active_binary_search.h +++ b/services/common/include/bundle_active_binary_search.h @@ -27,6 +27,7 @@ public: int32_t BinarySearch(const std::vector &tableNameArray, int64_t targetValue); DECLARE_DELAYED_SINGLETON(BundleActiveBinarySearch); }; -} -} -#endif \ No newline at end of file +} // namespace DeviceUsageStats +} // namespace OHOS +#endif // BUNDLE_ACTIVE_BINARY_SEARCH_H + diff --git a/services/common/include/bundle_active_common_event_subscriber.h b/services/common/include/bundle_active_common_event_subscriber.h index ffbf6e9..5ffc403 100644 --- a/services/common/include/bundle_active_common_event_subscriber.h +++ b/services/common/include/bundle_active_common_event_subscriber.h @@ -43,7 +43,7 @@ public: const std::weak_ptr bundleActiveReportHandler) : CommonEventSubscriber(subscriberInfo), activeGroupController_(activeGroupController), - bundleActiveReportHandler_(bundleActiveReportHandler) {}; + bundleActiveReportHandler_(bundleActiveReportHandler) {} ~BundleActiveCommonEventSubscriber() = default; void OnReceiveEvent(const CommonEventData &data) override; @@ -52,6 +52,7 @@ private: std::weak_ptr activeGroupController_; std::weak_ptr bundleActiveReportHandler_; }; -} -} -#endif \ No newline at end of file +} // namespace DeviceUsageStats +} // namespace OHOS +#endif // BUNDLE_ACTIVE_COMMON_EVENT_SUBSCRIBER_H + diff --git a/services/common/include/bundle_active_constant.h b/services/common/include/bundle_active_constant.h index e1a53eb..77fd191 100644 --- a/services/common/include/bundle_active_constant.h +++ b/services/common/include/bundle_active_constant.h @@ -108,4 +108,5 @@ const std::string DATABASE_TYPE[] = {"daily", "weekly", "monthly", "yearly", "ev const std::string SUFFIX_TYPE[] = {".db", ".db-shm", ".db-wal"}; } // namespace DeviceUsageStats } // namespace OHOS -#endif // BUNDLE_ACTIVE_CONSTANT_H \ No newline at end of file +#endif // BUNDLE_ACTIVE_CONSTANT_H + diff --git a/services/common/include/bundle_active_continuous_task_observer.h b/services/common/include/bundle_active_continuous_task_observer.h index 9db6267..3586b1f 100644 --- a/services/common/include/bundle_active_continuous_task_observer.h +++ b/services/common/include/bundle_active_continuous_task_observer.h @@ -45,6 +45,7 @@ private: void ReportContinuousTaskEvent(const std::shared_ptr& continuousTaskCallbackInfo, const bool isStart); }; -} -} -#endif \ No newline at end of file +} // namespace DeviceUsageStats +} // namespace OHOS +#endif // BUNDLE_ACTIVE_CONTINUOUS_TASK_OBSERVER_H + diff --git a/services/common/include/bundle_active_core.h b/services/common/include/bundle_active_core.h index c5949d2..e2037b1 100644 --- a/services/common/include/bundle_active_core.h +++ b/services/common/include/bundle_active_core.h @@ -40,7 +40,7 @@ public: BundleActiveReportHandlerObject(); BundleActiveReportHandlerObject(const int userId, const std::string bundleName); BundleActiveReportHandlerObject(const BundleActiveReportHandlerObject& orig); - ~BundleActiveReportHandlerObject() {}; + ~BundleActiveReportHandlerObject() {} }; class BundleActiveReportHandler; @@ -146,6 +146,7 @@ private: void RestoreAllData(); bool debugCore_; }; -} -} -#endif +} // namespace DeviceUsageStats +} // namespace OHOS +#endif // BUNDLE_ACTIVE_CORE_H + diff --git a/services/common/include/bundle_active_debug_mode.h b/services/common/include/bundle_active_debug_mode.h index 94786dd..667113a 100644 --- a/services/common/include/bundle_active_debug_mode.h +++ b/services/common/include/bundle_active_debug_mode.h @@ -19,6 +19,7 @@ namespace OHOS { namespace DeviceUsageStats { extern const bool DEBUG_ON; -} -} -#endif \ No newline at end of file +} // namespace DeviceUsageStats +} // namespace OHOS +#endif // BUNDLE_ACTIVE_DEBUG_MODE_H + diff --git a/services/common/include/bundle_active_log.h b/services/common/include/bundle_active_log.h index d4bc93a..0dae499 100644 --- a/services/common/include/bundle_active_log.h +++ b/services/common/include/bundle_active_log.h @@ -76,5 +76,5 @@ private: #define BUNDLE_ACTIVE_LOGF(fmt, ...) PRINT_LOG(FATAL, Fatal, fmt, ##__VA_ARGS__) } // namespace DeviceUsageStats } // namespace OHOS +#endif // BUNDLE_ACTIVE_LOG_H -#endif // BUNDLE_ACTIVE_LOG_H \ No newline at end of file diff --git a/services/common/include/bundle_active_open_callback.h b/services/common/include/bundle_active_open_callback.h index 235c8d4..7bd1a7d 100644 --- a/services/common/include/bundle_active_open_callback.h +++ b/services/common/include/bundle_active_open_callback.h @@ -30,6 +30,7 @@ public: int32_t OnCreate(NativeRdb::RdbStore &rdbStore) override; int32_t OnUpgrade(NativeRdb::RdbStore &rdbStore, int oldVersion, int newVersion) override; }; -} -} -#endif \ No newline at end of file +} // namespace DeviceUsageStats +} // namespace OHOS +#endif // BUNDLE_ACTIVE_OPEN_CALLBACK_H + diff --git a/services/common/include/bundle_active_service.h b/services/common/include/bundle_active_service.h index 3c93f0a..ff28fc2 100644 --- a/services/common/include/bundle_active_service.h +++ b/services/common/include/bundle_active_service.h @@ -76,6 +76,7 @@ private: bool SubscribeContinuousTask(); OHOS::sptr GetAppManagerInstance(); }; -} -} -#endif \ No newline at end of file +} // namespace DeviceUsageStats +} // namespace OHOS +#endif // BUNDLE_ACTIVE_SERVICE_H + diff --git a/services/common/include/bundle_active_shutdown_callback_proxy.h b/services/common/include/bundle_active_shutdown_callback_proxy.h index b62c001..e53fe5e 100644 --- a/services/common/include/bundle_active_shutdown_callback_proxy.h +++ b/services/common/include/bundle_active_shutdown_callback_proxy.h @@ -33,6 +33,7 @@ public: private: static inline BrokerDelegator delegator_; }; -} -} -#endif \ No newline at end of file +} // namespace DeviceUsageStats +} // namespace OHOS +#endif // BUNDLE_ACTIVE_SHUTDOWN_CALLBACK_PROXY_H + diff --git a/services/common/include/bundle_active_shutdown_callback_service.h b/services/common/include/bundle_active_shutdown_callback_service.h index b313873..95b3648 100644 --- a/services/common/include/bundle_active_shutdown_callback_service.h +++ b/services/common/include/bundle_active_shutdown_callback_service.h @@ -24,11 +24,12 @@ namespace DeviceUsageStats { class BundleActiveShutdownCallbackService : public BundleActiveShutdownCallbackStub { public: BundleActiveShutdownCallbackService(std::shared_ptr bundleActiveCore); - virtual ~BundleActiveShutdownCallbackService() {}; + virtual ~BundleActiveShutdownCallbackService() {} void ShutdownCallback() override; private: std::shared_ptr bundleActiveCore_; }; -} -} -#endif \ No newline at end of file +} // namespace DeviceUsageStats +} // namespace OHOS +#endif // BUNDLE_ACTIVE_SHUTDOWN_CALLBACK_SERVICE_H + diff --git a/services/common/include/bundle_active_shutdown_callback_stub.h b/services/common/include/bundle_active_shutdown_callback_stub.h index e0c110f..bef14c8 100644 --- a/services/common/include/bundle_active_shutdown_callback_stub.h +++ b/services/common/include/bundle_active_shutdown_callback_stub.h @@ -33,7 +33,7 @@ public: private: void ShutdownStub(); }; -} -} +} // namespace DeviceUsageStats +} // namespace OHOS +#endif // BUNDLE_ACTIVE_SHUTDOWN_CALLBACK_STUB_H -#endif \ No newline at end of file diff --git a/services/common/include/bundle_active_stub.h b/services/common/include/bundle_active_stub.h index 596fb3c..51164a1 100644 --- a/services/common/include/bundle_active_stub.h +++ b/services/common/include/bundle_active_stub.h @@ -22,11 +22,12 @@ namespace OHOS { namespace DeviceUsageStats { class BundleActiveStub : public IRemoteStub { public: - virtual int32_t OnRemoteRequest(uint32_t code, MessageParcel& data, MessageParcel &reply, + int32_t OnRemoteRequest(uint32_t code, MessageParcel& data, MessageParcel &reply, MessageOption &option) override; - BundleActiveStub() {}; - ~BundleActiveStub() {}; + BundleActiveStub() {} + ~BundleActiveStub() {} }; -} -} -#endif \ No newline at end of file +} // namespace DeviceUsageStats +} // namespace OHOS +#endif // BUNDLE_ACTIVE_STUB_H + diff --git a/services/common/include/bundle_active_usage_database.h b/services/common/include/bundle_active_usage_database.h index 6ad950d..d858749 100644 --- a/services/common/include/bundle_active_usage_database.h +++ b/services/common/include/bundle_active_usage_database.h @@ -100,6 +100,7 @@ private: std::int64_t eventBeginTime_; bool debugDatabase_; }; -} -} -#endif \ No newline at end of file +} // namespace DeviceUsageStats +} // namespace OHOS +#endif // BUNDLE_ACTIVE_USAGE_DATABASE_H + diff --git a/services/common/include/ibundle_active_service.h b/services/common/include/ibundle_active_service.h index 3740ca1..401584e 100644 --- a/services/common/include/ibundle_active_service.h +++ b/services/common/include/ibundle_active_service.h @@ -69,6 +69,7 @@ public: public: DECLARE_INTERFACE_DESCRIPTOR(u"Resourceschedule.IBundleActiveService"); }; -} -} -#endif \ No newline at end of file +} // namespace DeviceUsageStats +} // namespace OHOS +#endif // BUNDLE_ACTIVE_ISERVICE_H + diff --git a/services/common/src/bundle_active_app_state_obsever.cpp b/services/common/src/bundle_active_app_state_obsever.cpp index d598923..5f3a951 100644 --- a/services/common/src/bundle_active_app_state_obsever.cpp +++ b/services/common/src/bundle_active_app_state_obsever.cpp @@ -81,5 +81,6 @@ void BundleActiveAppStateObserver::OnAbilityStateChanged(const AbilityStateData } return; } -} -} \ No newline at end of file +} // namespace DeviceUsageStats +} // namespace OHOS + diff --git a/services/common/src/bundle_active_binary_search.cpp b/services/common/src/bundle_active_binary_search.cpp index 28ce020..b79b885 100644 --- a/services/common/src/bundle_active_binary_search.cpp +++ b/services/common/src/bundle_active_binary_search.cpp @@ -44,5 +44,6 @@ int32_t BundleActiveBinarySearch::BinarySearch(const std::vector &table } return -1; } -} -} \ No newline at end of file +} // namespace DeviceUsageStats +} // namespace OHOS + diff --git a/services/common/src/bundle_active_continuous_task_observer.cpp b/services/common/src/bundle_active_continuous_task_observer.cpp index 6a0df68..5492ace 100644 --- a/services/common/src/bundle_active_continuous_task_observer.cpp +++ b/services/common/src/bundle_active_continuous_task_observer.cpp @@ -114,5 +114,6 @@ void BundleActiveContinuousTaskObserver::ReportContinuousTaskEvent( } } } -} -} \ No newline at end of file +} // namespace DeviceUsageStats +} // namespace OHOS + diff --git a/services/common/src/bundle_active_core.cpp b/services/common/src/bundle_active_core.cpp index 2955382..01f0293 100644 --- a/services/common/src/bundle_active_core.cpp +++ b/services/common/src/bundle_active_core.cpp @@ -567,5 +567,6 @@ int64_t BundleActiveCore::GetSystemTimeMs() } return static_cast(tarDate); } -} -} +} // namespace DeviceUsageStats +} // namespace OHOS + diff --git a/services/common/src/bundle_active_debug_mode.cpp b/services/common/src/bundle_active_debug_mode.cpp index 19f1fe1..5863fc6 100644 --- a/services/common/src/bundle_active_debug_mode.cpp +++ b/services/common/src/bundle_active_debug_mode.cpp @@ -26,5 +26,6 @@ namespace DeviceUsageStats { constexpr int DEBUG_ON_DEFAULT = false; std::string DEBUG_MODE = "persist.sys.device_usage_debug_on"; const bool DEBUG_ON = static_cast(GetIntParameter(DEBUG_MODE, DEBUG_ON_DEFAULT)); -} -} \ No newline at end of file +} // namespace DeviceUsageStats +} // namespace OHOS + diff --git a/services/common/src/bundle_active_log.cpp b/services/common/src/bundle_active_log.cpp index ddd8839..2f875b4 100644 --- a/services/common/src/bundle_active_log.cpp +++ b/services/common/src/bundle_active_log.cpp @@ -41,3 +41,4 @@ std::string BundleActiveLog::GetCurrFileName(const char *str) } } // namespace DeviceUsageStats } // namespace OHOS + diff --git a/services/common/src/bundle_active_open_callback.cpp b/services/common/src/bundle_active_open_callback.cpp index edb4774..c114102 100644 --- a/services/common/src/bundle_active_open_callback.cpp +++ b/services/common/src/bundle_active_open_callback.cpp @@ -42,4 +42,5 @@ int32_t BundleActiveOpenCallback::OnUpgrade(NativeRdb::RdbStore &rdbStore, int o return NativeRdb::E_OK; }; } // namespace DeviceUsageStats -} // namespace OHOS \ No newline at end of file +} // namespace OHOS + diff --git a/services/common/src/bundle_active_service.cpp b/services/common/src/bundle_active_service.cpp index d5dc82d..f9170fa 100644 --- a/services/common/src/bundle_active_service.cpp +++ b/services/common/src/bundle_active_service.cpp @@ -429,5 +429,6 @@ bool BundleActiveService::CheckBundleIsSystemAppAndHasPermission(const int uid, return true; } } -} -} \ No newline at end of file +} // namespace DeviceUsageStats +} // namespace OHOS + diff --git a/services/common/src/bundle_active_shutdown_callback_proxy.cpp b/services/common/src/bundle_active_shutdown_callback_proxy.cpp index 7ef9740..565e54e 100644 --- a/services/common/src/bundle_active_shutdown_callback_proxy.cpp +++ b/services/common/src/bundle_active_shutdown_callback_proxy.cpp @@ -34,5 +34,6 @@ void BundleActiveShutdownCallbackProxy::ShutdownCallback() BUNDLE_ACTIVE_LOGE("BundleActiveShutdownCallbackProxy::ShutdownCallback failed!"); } } -} -} \ No newline at end of file +} // namespace DeviceUsageStats +} // namespace OHOS + diff --git a/services/common/src/bundle_active_shutdown_callback_service.cpp b/services/common/src/bundle_active_shutdown_callback_service.cpp index 4832a46..3d9813e 100644 --- a/services/common/src/bundle_active_shutdown_callback_service.cpp +++ b/services/common/src/bundle_active_shutdown_callback_service.cpp @@ -29,5 +29,7 @@ void BundleActiveShutdownCallbackService::ShutdownCallback() { bundleActiveCore_->ShutDown(); } -} -} +} // namespace DeviceUsageStats +} // namespace OHOS + + diff --git a/services/common/src/bundle_active_shutdown_callback_stub.cpp b/services/common/src/bundle_active_shutdown_callback_stub.cpp index f4cac49..f4550d5 100644 --- a/services/common/src/bundle_active_shutdown_callback_stub.cpp +++ b/services/common/src/bundle_active_shutdown_callback_stub.cpp @@ -40,5 +40,6 @@ void BundleActiveShutdownCallbackStub::ShutdownStub() { ShutdownCallback(); } -} -} \ No newline at end of file +} // namespace DeviceUsageStats +} // namespace OHOS + diff --git a/services/common/src/bundle_active_stub.cpp b/services/common/src/bundle_active_stub.cpp index f24e1a2..d221187 100644 --- a/services/common/src/bundle_active_stub.cpp +++ b/services/common/src/bundle_active_stub.cpp @@ -134,5 +134,6 @@ int32_t BundleActiveStub::OnRemoteRequest(uint32_t code, MessageParcel& data, Me return IPCObjectStub::OnRemoteRequest(code, data, reply, option); } } -} -} \ No newline at end of file +} // namespace DeviceUsageStats +} // namespace OHOS + diff --git a/services/common/src/bundle_active_usage_database.cpp b/services/common/src/bundle_active_usage_database.cpp index c791314..729b7ff 100644 --- a/services/common/src/bundle_active_usage_database.cpp +++ b/services/common/src/bundle_active_usage_database.cpp @@ -1255,5 +1255,6 @@ int64_t BundleActiveUsageDatabase::GetSystemTimeMs() } return static_cast(tarDate); } -} -} \ No newline at end of file +} // namespace DeviceUsageStats +} // namespace OHOS + diff --git a/services/packagegroup/include/bundle_active_group_common.h b/services/packagegroup/include/bundle_active_group_common.h index 4d8fe0b..48208ac 100644 --- a/services/packagegroup/include/bundle_active_group_common.h +++ b/services/packagegroup/include/bundle_active_group_common.h @@ -61,6 +61,7 @@ const uint32_t GROUP_EVENT_REASON_LONG_TIME_TASK_STARTTED = 0x0007; const uint32_t GROUP_EVENT_REASON_CALCULATED_RESTORED = 0x0008; const uint32_t GROUP_EVENT_REASON_ALIVE_NOT_TIMEOUT = 0x0009; } -} -} -#endif \ No newline at end of file +} // namespace DeviceUsageStats +} // namespace OHOS +#endif // BUNDLE_ACTIVE_GROUP_COMMON_H + diff --git a/services/packagegroup/include/bundle_active_group_controller.h b/services/packagegroup/include/bundle_active_group_controller.h index 9d0c271..4bfb845 100644 --- a/services/packagegroup/include/bundle_active_group_controller.h +++ b/services/packagegroup/include/bundle_active_group_controller.h @@ -52,7 +52,7 @@ public: std::vector screenTimeLevel_ = {0, 0, 0, 0}; std::vector bootTimeLevel_ = {0, 0, 0, 0}; BundleActiveGroupController(const bool debug); - ~BundleActiveGroupController() {}; + ~BundleActiveGroupController() {} std::shared_ptr bundleUserHistory_; void SetHandlerAndCreateUserHistory(const std::shared_ptr& groupHandler, const int64_t bootFromTimeStamp); @@ -89,7 +89,7 @@ private: const int64_t bootBasedTimeStamp); int GetNewGroup(const std::string& bundleName, const int userId, const int64_t bootBasedTimeStamp); }; -} -} +} // namespace DeviceUsageStats +} // namespace OHOS +#endif // BUNDLE_ACTIVE_GROUP_CONTROLLER_H -#endif \ No newline at end of file diff --git a/services/packagegroup/include/bundle_active_group_handler.h b/services/packagegroup/include/bundle_active_group_handler.h index 06c801b..cea2d17 100644 --- a/services/packagegroup/include/bundle_active_group_handler.h +++ b/services/packagegroup/include/bundle_active_group_handler.h @@ -31,7 +31,7 @@ public: int userId_; BundleActiveGroupHandlerObject(); BundleActiveGroupHandlerObject(const BundleActiveGroupHandlerObject& orig); - ~BundleActiveGroupHandlerObject() {}; + ~BundleActiveGroupHandlerObject() {} }; class BundleActiveGroupHandler : public AppExecFwk::EventHandler { @@ -53,6 +53,7 @@ public: private: std::shared_ptr bundleActiveGroupController_; }; -} -} -#endif \ No newline at end of file +} // namespace DeviceUsageStats +} // namespace OHOS +#endif // BUNDLE_ACTIVE_GROUP_HANDLER_H + diff --git a/services/packagegroup/include/bundle_active_package_history.h b/services/packagegroup/include/bundle_active_package_history.h index bfced55..3a1af0d 100644 --- a/services/packagegroup/include/bundle_active_package_history.h +++ b/services/packagegroup/include/bundle_active_package_history.h @@ -32,8 +32,9 @@ public: int64_t bundleDailyTimeoutTimeStamp_; bool isChanged_; BundleActivePackageHistory(); - ~BundleActivePackageHistory() {}; + ~BundleActivePackageHistory() {} }; -} -} -#endif \ No newline at end of file +} // namespace DeviceUsageStats +} // namespace OHOS +#endif // BUNDLE_ACTIVE_USAGE_HISTORY_H + diff --git a/services/packagegroup/include/bundle_active_user_history.h b/services/packagegroup/include/bundle_active_user_history.h index c86a545..4b9e3c3 100644 --- a/services/packagegroup/include/bundle_active_user_history.h +++ b/services/packagegroup/include/bundle_active_user_history.h @@ -61,6 +61,7 @@ public: private: bool isScreenOn_; }; -} -} -#endif \ No newline at end of file +} // namespace DeviceUsageStats +} // namespace OHOS +#endif // BUNDLE_ACTIVE_USER_HISTORY_H + diff --git a/services/packagegroup/src/bundle_active_group_controller.cpp b/services/packagegroup/src/bundle_active_group_controller.cpp index a837554..e11ec5d 100644 --- a/services/packagegroup/src/bundle_active_group_controller.cpp +++ b/services/packagegroup/src/bundle_active_group_controller.cpp @@ -404,5 +404,6 @@ bool BundleActiveGroupController::IsScreenOn() BUNDLE_ACTIVE_LOGI("IsScreenOn() is %{public}d", result); return result; } -} -} \ No newline at end of file +} // namespace DeviceUsageStats +} // namespace OHOS + diff --git a/services/packagegroup/src/bundle_active_group_handler.cpp b/services/packagegroup/src/bundle_active_group_handler.cpp index f7315c7..b604024 100644 --- a/services/packagegroup/src/bundle_active_group_handler.cpp +++ b/services/packagegroup/src/bundle_active_group_handler.cpp @@ -99,5 +99,6 @@ void BundleActiveGroupHandler::ProcessEvent(const AppExecFwk::InnerEvent::Pointe } } } -} -} \ No newline at end of file +} // namespace DeviceUsageStats +} // namespace OHOS + diff --git a/services/packagegroup/src/bundle_active_user_history.cpp b/services/packagegroup/src/bundle_active_user_history.cpp index 6479e6d..b06c8bc 100644 --- a/services/packagegroup/src/bundle_active_user_history.cpp +++ b/services/packagegroup/src/bundle_active_user_history.cpp @@ -245,5 +245,6 @@ void BundleActiveUserHistory::printdata(int userId) oneBundleUsage.second->bundleDailyTimeoutTimeStamp_, oneBundleUsage.second->bundleAliveTimeoutTimeStamp_); } } -} -} \ No newline at end of file +} // namespace DeviceUsageStats +} // namespace OHOS + diff --git a/services/packageusage/include/bundle_active_calendar.h b/services/packageusage/include/bundle_active_calendar.h index b8c166c..4bde454 100644 --- a/services/packageusage/include/bundle_active_calendar.h +++ b/services/packageusage/include/bundle_active_calendar.h @@ -54,6 +54,7 @@ public: private: int64_t time_; }; -} -} -#endif \ No newline at end of file +} // namespace DeviceUsageStats +} // namespace OHOS +#endif // BUNDLE_ACTIVE_CALENDER_H + diff --git a/services/packageusage/include/bundle_active_event.h b/services/packageusage/include/bundle_active_event.h index 4e66b23..dc26307 100644 --- a/services/packageusage/include/bundle_active_event.h +++ b/services/packageusage/include/bundle_active_event.h @@ -60,6 +60,7 @@ public: virtual bool Marshalling(Parcel &parcel) const override; std::shared_ptr Unmarshalling(Parcel &parcel); }; -} -} -#endif \ No newline at end of file +} // namespace DeviceUsageStats +} // namespace OHOS +#endif // BUNDLE_ACTIVE_EVENT_H + diff --git a/services/packageusage/include/bundle_active_event_list.h b/services/packageusage/include/bundle_active_event_list.h index 7fff6f6..4a0a02d 100644 --- a/services/packageusage/include/bundle_active_event_list.h +++ b/services/packageusage/include/bundle_active_event_list.h @@ -24,7 +24,7 @@ namespace DeviceUsageStats { class BundleActiveEventList { public: BundleActiveEventList(); - ~BundleActiveEventList() {}; + ~BundleActiveEventList() {} int Size(); void Clear(); void Insert(BundleActiveEvent event); @@ -32,6 +32,7 @@ public: void Merge(const BundleActiveEventList& right); std::vector events_; }; -} -} -#endif \ No newline at end of file +} // namespace DeviceUsageStats +} // namespace OHOS +#endif // BUNDLE_ACTIVE_EVENT_LIST_H + diff --git a/services/packageusage/include/bundle_active_event_stats.h b/services/packageusage/include/bundle_active_event_stats.h index 77d9e2d..b15af31 100644 --- a/services/packageusage/include/bundle_active_event_stats.h +++ b/services/packageusage/include/bundle_active_event_stats.h @@ -38,6 +38,7 @@ public: int GetCount(); void add(const BundleActiveEventStats& right); }; -} -} -#endif \ No newline at end of file +} // namespace DeviceUsageStats +} // namespace OHOS +#endif // BUNDLE_ACTIVE_EVENT_STATS_H + diff --git a/services/packageusage/include/bundle_active_event_tracker.h b/services/packageusage/include/bundle_active_event_tracker.h index 26d13a0..7e8757b 100644 --- a/services/packageusage/include/bundle_active_event_tracker.h +++ b/services/packageusage/include/bundle_active_event_tracker.h @@ -33,6 +33,7 @@ public: int64_t endTime); BundleActiveEventTracker(); }; -} -} -#endif \ No newline at end of file +} // namespace DeviceUsageStats +} // namespace OHOS +#endif // BUNDLE_ACTIVE_EVENT_TRACKER_H + diff --git a/services/packageusage/include/bundle_active_package_stats.h b/services/packageusage/include/bundle_active_package_stats.h index 379e0a8..6e648a8 100644 --- a/services/packageusage/include/bundle_active_package_stats.h +++ b/services/packageusage/include/bundle_active_package_stats.h @@ -13,8 +13,8 @@ * limitations under the License. */ -#ifndef BUNDLE_ACTIVE_USAGE_STATS_H -#define BUNDLE_ACTIVE_USAGE_STATS_H +#ifndef BUNDLE_ACTIVE_PACKAGE_STATS_H +#define BUNDLE_ACTIVE_PACKAGE_STATS_H #include "ibundle_active_service.h" #include "bundle_active_event.h" @@ -38,7 +38,7 @@ public: // key is name of continuous task, value is last event of this last continuous task. std::map longTimeTasks_; BundleActivePackageStats(); - ~BundleActivePackageStats() {}; + ~BundleActivePackageStats() {} BundleActivePackageStats(const BundleActivePackageStats& orig); std::string GetBundleName(); int64_t GetBeginTimeStamp(); @@ -64,6 +64,7 @@ private: void UpdateAbility(const int64_t timeStamp, const int eventId, const std::string& abilityId); void UpdateLongTimeTask(const std::string& longTimeTaskName, const int64_t timeStamp, const int eventId); }; -} -} -#endif +} // namespace DeviceUsageStats +} // namespace OHOS +#endif // BUNDLE_ACTIVE_PACKAGE_STATS_H + diff --git a/services/packageusage/include/bundle_active_period_stats.h b/services/packageusage/include/bundle_active_period_stats.h index 1c71061..3a7a317 100644 --- a/services/packageusage/include/bundle_active_period_stats.h +++ b/services/packageusage/include/bundle_active_period_stats.h @@ -60,6 +60,7 @@ public: void AddEventStatsTo(std::vector& eventStatsList); std::string GetCachedString(std::string str); }; -} -} -#endif \ No newline at end of file +} // namespace DeviceUsageStats +} // namespace OHOS +#endif // BUNDLE_ACTIVE_PERIOD_STATS_H + diff --git a/services/packageusage/include/bundle_active_report_handler.h b/services/packageusage/include/bundle_active_report_handler.h index f0fcdaa..dd44984 100644 --- a/services/packageusage/include/bundle_active_report_handler.h +++ b/services/packageusage/include/bundle_active_report_handler.h @@ -44,6 +44,7 @@ public: private: std::shared_ptr bundleActiveCore_; }; -} -} -#endif \ No newline at end of file +} // namespace DeviceUsageStats +} // namespace OHOS +#endif // BUNDLE_ACTIVE_REPORT_HANDLER_H + diff --git a/services/packageusage/include/bundle_active_stats_combiner.h b/services/packageusage/include/bundle_active_stats_combiner.h index 710abc5..1299cb0 100644 --- a/services/packageusage/include/bundle_active_stats_combiner.h +++ b/services/packageusage/include/bundle_active_stats_combiner.h @@ -40,6 +40,7 @@ public: void combine(const std::shared_ptr& stats, std::vector& accumulatedResult, int64_t beginTime = 0); }; -} -} -#endif \ No newline at end of file +} // namespace DeviceUsageStats +} // namespace OHOS +#endif // BUNDLE_ACTIVE_STATS_COMBINER_H + diff --git a/services/packageusage/include/bundle_active_stats_update_listener.h b/services/packageusage/include/bundle_active_stats_update_listener.h index 6968b6c..b5de8d2 100644 --- a/services/packageusage/include/bundle_active_stats_update_listener.h +++ b/services/packageusage/include/bundle_active_stats_update_listener.h @@ -23,6 +23,7 @@ class BundleActiveStatsUpdateListener { virtual void OnStatsReload() = 0; virtual void OnSystemUpdate(int userId) = 0; }; -} -} -#endif \ No newline at end of file +} // namespace DeviceUsageStats +} // namespace OHOS +#endif // BUNDLE_ACTIVE_STATS_UPDATE_LISTENER_H + diff --git a/services/packageusage/include/bundle_active_user_service.h b/services/packageusage/include/bundle_active_user_service.h index 8bf0fed..dffb022 100644 --- a/services/packageusage/include/bundle_active_user_service.h +++ b/services/packageusage/include/bundle_active_user_service.h @@ -53,7 +53,7 @@ public: } } void Init(const int64_t timeStamp); - ~BundleActiveUserService() {}; + ~BundleActiveUserService() {} void ReportForShutdown(const BundleActiveEvent& event); void ReportEvent(const BundleActiveEvent& event); void RestoreStats(bool forced); @@ -83,6 +83,7 @@ private: void PrintInMemPackageStats(const int idx); void PrintInMemEventStats(); }; -} -} -#endif \ No newline at end of file +} // namespace DeviceUsageStats +} // namespace OHOS +#endif // BUNDLE_ACTIVE_USER_SERVICE_H + diff --git a/services/packageusage/src/bundle_active_calendar.cpp b/services/packageusage/src/bundle_active_calendar.cpp index 70c88f1..270742a 100644 --- a/services/packageusage/src/bundle_active_calendar.cpp +++ b/services/packageusage/src/bundle_active_calendar.cpp @@ -104,5 +104,6 @@ void BundleActiveCalendar::TruncateTo(int intervalType) break; } } -} -} \ No newline at end of file +} // namespace DeviceUsageStats +} // namespace OHOS + diff --git a/services/packageusage/src/bundle_active_event.cpp b/services/packageusage/src/bundle_active_event.cpp index bc6c81f..e07abd4 100644 --- a/services/packageusage/src/bundle_active_event.cpp +++ b/services/packageusage/src/bundle_active_event.cpp @@ -88,5 +88,6 @@ std::shared_ptr BundleActiveEvent::Unmarshalling(Parcel &parc result->timeStamp_ = parcel.ReadInt64(); return result; } -} -} +} // namespace DeviceUsageStats +} // namespace OHOS + diff --git a/services/packageusage/src/bundle_active_event_list.cpp b/services/packageusage/src/bundle_active_event_list.cpp index 51c081b..66d47e3 100644 --- a/services/packageusage/src/bundle_active_event_list.cpp +++ b/services/packageusage/src/bundle_active_event_list.cpp @@ -68,5 +68,6 @@ void BundleActiveEventList::Merge(const BundleActiveEventList& right) Insert(right.events_[i]); } } -} -} \ No newline at end of file +} // namespace DeviceUsageStats +} // namespace OHOS + diff --git a/services/packageusage/src/bundle_active_event_stats.cpp b/services/packageusage/src/bundle_active_event_stats.cpp index 3bb55e0..988c09b 100644 --- a/services/packageusage/src/bundle_active_event_stats.cpp +++ b/services/packageusage/src/bundle_active_event_stats.cpp @@ -81,5 +81,6 @@ void BundleActiveEventStats::add(const BundleActiveEventStats& right) totalTime_ += right.totalTime_; count_ += right.count_; } -} -} \ No newline at end of file +} // namespace DeviceUsageStats +} // namespace OHOS + diff --git a/services/packageusage/src/bundle_active_event_tracker.cpp b/services/packageusage/src/bundle_active_event_tracker.cpp index caea54d..a1165bd 100644 --- a/services/packageusage/src/bundle_active_event_tracker.cpp +++ b/services/packageusage/src/bundle_active_event_tracker.cpp @@ -57,5 +57,6 @@ void BundleActiveEventTracker::AddToEventStats(std::vector BundleActivePackageStats::Unmarshallin result->totalContiniousTaskUsedTime_ = parcel.ReadInt64(); return result; } -} -} \ No newline at end of file +} // namespace DeviceUsageStats +} // namespace OHOS + diff --git a/services/packageusage/src/bundle_active_period_stats.cpp b/services/packageusage/src/bundle_active_period_stats.cpp index e9f0b71..22f1eee 100644 --- a/services/packageusage/src/bundle_active_period_stats.cpp +++ b/services/packageusage/src/bundle_active_period_stats.cpp @@ -137,5 +137,6 @@ std::string BundleActivePeriodStats::GetCachedString(std::string str) } return *it; } -} -} \ No newline at end of file +} // namespace DeviceUsageStats +} // namespace OHOS + diff --git a/services/packageusage/src/bundle_active_report_handler.cpp b/services/packageusage/src/bundle_active_report_handler.cpp index e116809..40b90fc 100644 --- a/services/packageusage/src/bundle_active_report_handler.cpp +++ b/services/packageusage/src/bundle_active_report_handler.cpp @@ -79,5 +79,6 @@ void BundleActiveReportHandler::ProcessEvent(const AppExecFwk::InnerEvent::Point } } } -} -} \ No newline at end of file +} // namespace DeviceUsageStats +} // namespace OHOS + diff --git a/services/packageusage/src/bundle_active_stats_combiner.cpp b/services/packageusage/src/bundle_active_stats_combiner.cpp index 4e63f90..e704baf 100644 --- a/services/packageusage/src/bundle_active_stats_combiner.cpp +++ b/services/packageusage/src/bundle_active_stats_combiner.cpp @@ -40,5 +40,6 @@ void BundleActiveStatsCombiner::combine(const std::shared_ptr accumulatedResult.push_back(stats->events_.events_[i]); } } -} -} \ No newline at end of file +} // namespace DeviceUsageStats +} // namespace OHOS + diff --git a/services/packageusage/src/bundle_active_user_service.cpp b/services/packageusage/src/bundle_active_user_service.cpp index 57f017c..cf60fae 100644 --- a/services/packageusage/src/bundle_active_user_service.cpp +++ b/services/packageusage/src/bundle_active_user_service.cpp @@ -406,5 +406,6 @@ void BundleActiveUserService::PrintInMemEventStats() abilityId.c_str(), abilityname.c_str(), bundlename.c_str(), eventid, timestamp); } } -} -} \ No newline at end of file +} // namespace DeviceUsageStats +} // namespace OHOS + diff --git a/test/unittest/device_usage_statistics_test.cpp b/test/unittest/device_usage_statistics_test.cpp index 277df46..bade742 100644 --- a/test/unittest/device_usage_statistics_test.cpp +++ b/test/unittest/device_usage_statistics_test.cpp @@ -155,5 +155,6 @@ HWTEST_F(DeviceUsageStatisticsTest, DeviceUsageStatisticsTest_QueryPackageGroup_ int result = BundleActiveClient::GetInstance().QueryPackageGroup(); EXPECT_EQ(result, -1); } -} -} +} // namespace DeviceUsageStats +} // namespace OHOS + -- Gitee