From 4985cb2decc656c35d9e286fe7a6a249b0d47ce2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E5=8B=87=E7=90=A6?= Date: Mon, 17 Feb 2025 08:40:18 +0000 Subject: [PATCH 1/2] =?UTF-8?q?sensorMap=20=E6=95=B4=E6=94=B9=E5=87=8F?= =?UTF-8?q?=E5=B0=91=E5=86=85=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 杨勇琦 Change-Id: I679fc567cf09a95b7bc2f90481f2cae205ec6f6e --- frameworks/cj/include/cj_sensor_ffi.h | 2 -- frameworks/cj/include/cj_sensor_impl.h | 3 --- 2 files changed, 5 deletions(-) mode change 100644 => 100755 frameworks/cj/include/cj_sensor_ffi.h mode change 100644 => 100755 frameworks/cj/include/cj_sensor_impl.h diff --git a/frameworks/cj/include/cj_sensor_ffi.h b/frameworks/cj/include/cj_sensor_ffi.h old mode 100644 new mode 100755 index 7296d134..c3f1cae2 --- a/frameworks/cj/include/cj_sensor_ffi.h +++ b/frameworks/cj/include/cj_sensor_ffi.h @@ -16,8 +16,6 @@ #ifndef OHOS_CJ_SENSOR_FFI_H #define OHOS_CJ_SENSOR_FFI_H -#include - #include "cj_sensor_visibility.h" #include "sensor_agent_type.h" diff --git a/frameworks/cj/include/cj_sensor_impl.h b/frameworks/cj/include/cj_sensor_impl.h old mode 100644 new mode 100755 index 95200c9e..b8f2296f --- a/frameworks/cj/include/cj_sensor_impl.h +++ b/frameworks/cj/include/cj_sensor_impl.h @@ -16,12 +16,9 @@ #ifndef OHOS_CJ_SENSOR_IMPL_H #define OHOS_CJ_SENSOR_IMPL_H -#include #include -#include #include "cj_sensor_ffi.h" -#include "sensor_agent_type.h" #include "singleton.h" namespace OHOS { -- Gitee From b5fc2eb8910755658a3b0002b822ec5bde9af188 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E5=8B=87=E7=90=A6?= Date: Mon, 17 Feb 2025 08:55:07 +0000 Subject: [PATCH 2/2] =?UTF-8?q?sensorMap=20=E6=95=B4=E6=94=B9=E5=87=8F?= =?UTF-8?q?=E5=B0=91=E5=86=85=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 杨勇琦 Change-Id: I704c1338a93f57fcb49f16659c9de28537c86141 --- frameworks/cj/BUILD.gn | 2 -- frameworks/cj/src/cj_sensor_impl.cpp | 6 ------ frameworks/js/napi/BUILD.gn | 3 --- frameworks/js/napi/src/sensor_napi_utils.cpp | 4 ---- frameworks/native/BUILD.gn | 4 ---- frameworks/native/include/fd_listener.h | 3 --- frameworks/native/include/geomagnetic_field.h | 1 - frameworks/native/include/i_sensor_service.h | 5 ----- frameworks/native/include/sensor_agent_proxy.h | 4 ---- frameworks/native/include/sensor_algorithm.h | 1 - frameworks/native/include/sensor_client_proxy.h | 2 -- frameworks/native/include/sensor_client_stub.h | 1 - frameworks/native/include/sensor_data_channel.h | 3 --- frameworks/native/include/sensor_event_handler.h | 1 - .../include/sensor_file_descriptor_listener.h | 4 ---- .../native/include/sensor_service_client.h | 6 ------ frameworks/native/include/sensor_service_proxy.h | 3 --- frameworks/native/src/fd_listener.cpp | 14 -------------- frameworks/native/src/geomagnetic_field.cpp | 2 -- frameworks/native/src/native_sensor.cpp | 2 -- frameworks/native/src/sensor_agent_proxy.cpp | 4 ---- frameworks/native/src/sensor_algorithm.cpp | 3 --- frameworks/native/src/sensor_client_stub.cpp | 1 - frameworks/native/src/sensor_data_channel.cpp | 4 ---- .../src/sensor_file_descriptor_listener.cpp | 16 ---------------- frameworks/native/src/sensor_service_client.cpp | 9 --------- frameworks/native/src/sensor_service_proxy.cpp | 5 ----- services/BUILD.gn | 2 -- .../adapter/include/sensor_event_callback.h | 2 -- .../adapter/src/compatible_connection.cpp | 2 -- .../adapter/src/hdi_connection.cpp | 1 - .../adapter/src/sensor_event_callback.cpp | 1 - .../hardware/include/hdi_service_impl.h | 2 -- .../hardware/src/hdi_service_impl.cpp | 3 --- .../interface/include/i_sensor_hdi_connection.h | 1 - .../interface/include/sensor_hdi_connection.h | 1 - services/include/client_info.h | 6 ------ services/include/fifo_cache_data.h | 4 ---- services/include/flush_info_record.h | 9 --------- services/include/sensor_data_processer.h | 15 +++------------ services/include/sensor_dump.h | 6 ------ services/include/sensor_manager.h | 6 ------ services/include/sensor_power_policy.h | 8 -------- services/include/sensor_service.h | 9 --------- services/include/sensor_service_stub.h | 2 -- services/include/stream_server.h | 1 - services/src/client_info.cpp | 5 ----- services/src/flush_info_record.cpp | 2 -- services/src/sensor_data_processer.cpp | 6 ------ services/src/sensor_dump.cpp | 4 ---- services/src/sensor_manager.cpp | 6 +----- services/src/sensor_power_policy.cpp | 2 -- services/src/sensor_service.cpp | 7 +------ services/src/sensor_service_stub.cpp | 6 ------ utils/common/include/permission_util.h | 3 --- utils/common/include/sensor.h | 3 --- utils/common/include/sensor_basic_data_channel.h | 2 -- utils/common/include/sensor_channel_info.h | 2 -- utils/common/include/sensor_errors.h | 2 -- utils/common/src/print_sensor_data.cpp | 3 --- utils/ipc/include/net_packet.h | 1 - utils/ipc/include/proto.h | 2 -- utils/ipc/include/stream_buffer.h | 1 - utils/ipc/include/stream_session.h | 2 -- utils/ipc/include/stream_socket.h | 4 ---- utils/ipc/src/circle_stream_buffer.cpp | 2 -- utils/ipc/src/net_packet.cpp | 2 -- utils/ipc/src/stream_session.cpp | 3 --- utils/ipc/src/stream_socket.cpp | 3 --- 69 files changed, 5 insertions(+), 262 deletions(-) mode change 100644 => 100755 frameworks/cj/BUILD.gn mode change 100644 => 100755 frameworks/cj/src/cj_sensor_impl.cpp mode change 100644 => 100755 frameworks/js/napi/BUILD.gn mode change 100644 => 100755 frameworks/js/napi/src/sensor_napi_utils.cpp mode change 100644 => 100755 frameworks/native/BUILD.gn mode change 100644 => 100755 frameworks/native/include/fd_listener.h mode change 100644 => 100755 frameworks/native/include/geomagnetic_field.h mode change 100644 => 100755 frameworks/native/include/sensor_agent_proxy.h mode change 100644 => 100755 frameworks/native/include/sensor_algorithm.h mode change 100644 => 100755 frameworks/native/include/sensor_data_channel.h mode change 100644 => 100755 frameworks/native/include/sensor_file_descriptor_listener.h mode change 100644 => 100755 frameworks/native/src/fd_listener.cpp mode change 100644 => 100755 frameworks/native/src/geomagnetic_field.cpp mode change 100644 => 100755 frameworks/native/src/native_sensor.cpp mode change 100644 => 100755 frameworks/native/src/sensor_agent_proxy.cpp mode change 100644 => 100755 frameworks/native/src/sensor_algorithm.cpp mode change 100644 => 100755 frameworks/native/src/sensor_client_stub.cpp mode change 100644 => 100755 frameworks/native/src/sensor_data_channel.cpp mode change 100644 => 100755 frameworks/native/src/sensor_file_descriptor_listener.cpp mode change 100644 => 100755 frameworks/native/src/sensor_service_client.cpp mode change 100644 => 100755 frameworks/native/src/sensor_service_proxy.cpp mode change 100644 => 100755 services/BUILD.gn mode change 100644 => 100755 services/hdi_connection/adapter/include/sensor_event_callback.h mode change 100644 => 100755 services/hdi_connection/adapter/src/compatible_connection.cpp mode change 100644 => 100755 services/hdi_connection/adapter/src/hdi_connection.cpp mode change 100644 => 100755 services/hdi_connection/adapter/src/sensor_event_callback.cpp mode change 100644 => 100755 services/hdi_connection/hardware/include/hdi_service_impl.h mode change 100644 => 100755 services/hdi_connection/hardware/src/hdi_service_impl.cpp mode change 100644 => 100755 services/hdi_connection/interface/include/i_sensor_hdi_connection.h mode change 100644 => 100755 services/hdi_connection/interface/include/sensor_hdi_connection.h mode change 100644 => 100755 services/include/client_info.h mode change 100644 => 100755 services/include/fifo_cache_data.h mode change 100644 => 100755 services/include/flush_info_record.h mode change 100644 => 100755 services/include/sensor_dump.h mode change 100644 => 100755 services/include/sensor_manager.h mode change 100644 => 100755 services/include/sensor_power_policy.h mode change 100644 => 100755 services/include/sensor_service.h mode change 100644 => 100755 services/include/sensor_service_stub.h mode change 100644 => 100755 services/include/stream_server.h mode change 100644 => 100755 services/src/client_info.cpp mode change 100644 => 100755 services/src/flush_info_record.cpp mode change 100644 => 100755 services/src/sensor_dump.cpp mode change 100644 => 100755 services/src/sensor_manager.cpp mode change 100644 => 100755 services/src/sensor_power_policy.cpp mode change 100644 => 100755 services/src/sensor_service.cpp mode change 100644 => 100755 services/src/sensor_service_stub.cpp mode change 100644 => 100755 utils/common/include/permission_util.h mode change 100644 => 100755 utils/common/include/sensor.h mode change 100644 => 100755 utils/common/include/sensor_basic_data_channel.h mode change 100644 => 100755 utils/common/include/sensor_channel_info.h mode change 100644 => 100755 utils/common/include/sensor_errors.h mode change 100644 => 100755 utils/common/src/print_sensor_data.cpp mode change 100644 => 100755 utils/ipc/include/net_packet.h mode change 100644 => 100755 utils/ipc/include/proto.h mode change 100644 => 100755 utils/ipc/include/stream_buffer.h mode change 100644 => 100755 utils/ipc/include/stream_session.h mode change 100644 => 100755 utils/ipc/include/stream_socket.h mode change 100644 => 100755 utils/ipc/src/circle_stream_buffer.cpp mode change 100644 => 100755 utils/ipc/src/net_packet.cpp mode change 100644 => 100755 utils/ipc/src/stream_session.cpp mode change 100644 => 100755 utils/ipc/src/stream_socket.cpp diff --git a/frameworks/cj/BUILD.gn b/frameworks/cj/BUILD.gn old mode 100644 new mode 100755 index 7198ec1e..af43f0f6 --- a/frameworks/cj/BUILD.gn +++ b/frameworks/cj/BUILD.gn @@ -43,9 +43,7 @@ ohos_shared_library("cj_sensor_ffi") { deps = [ "$SUBSYSTEM_DIR/frameworks/native:sensor_interface_native" ] external_deps = [ - "c_utils:utils", "hilog:libhilog", - "napi:cj_bind_ffi", "napi:cj_bind_native", ] diff --git a/frameworks/cj/src/cj_sensor_impl.cpp b/frameworks/cj/src/cj_sensor_impl.cpp old mode 100644 new mode 100755 index 5b8d50c7..ae5739b7 --- a/frameworks/cj/src/cj_sensor_impl.cpp +++ b/frameworks/cj/src/cj_sensor_impl.cpp @@ -15,13 +15,7 @@ #include "cj_sensor_impl.h" -#include -#include -#include - #include "cj_lambda.h" -#include "cj_sensor_ffi.h" -#include "errors.h" #include "geomagnetic_field.h" #include "sensor_agent.h" #include "sensor_algorithm.h" diff --git a/frameworks/js/napi/BUILD.gn b/frameworks/js/napi/BUILD.gn old mode 100644 new mode 100755 index dbbfda13..d7a75591 --- a/frameworks/js/napi/BUILD.gn +++ b/frameworks/js/napi/BUILD.gn @@ -39,7 +39,6 @@ ohos_shared_library("libsensor") { } deps = [ "$SUBSYSTEM_DIR/frameworks/native:sensor_interface_native", - "$SUBSYSTEM_DIR/utils/common:libsensor_utils", ] external_deps = [ "bundle_framework:appexecfwk_base", @@ -48,8 +47,6 @@ ohos_shared_library("libsensor") { "hilog:libhilog", "ipc:ipc_single", "napi:ace_napi", - "safwk:system_ability_fwk", - "samgr:samgr_proxy", ] relative_install_dir = "module" part_name = "sensor" diff --git a/frameworks/js/napi/src/sensor_napi_utils.cpp b/frameworks/js/napi/src/sensor_napi_utils.cpp old mode 100644 new mode 100755 index 66d14d78..cc4b74c9 --- a/frameworks/js/napi/src/sensor_napi_utils.cpp +++ b/frameworks/js/napi/src/sensor_napi_utils.cpp @@ -34,7 +34,6 @@ constexpr int32_t STRING_LENGTH_MAX = 64; static std::mutex g_sensorAttrListMutex; bool IsSameValue(const napi_env &env, const napi_value &lhs, const napi_value &rhs) { - CALL_LOG_ENTER; bool result = false; CHKNRF(env, napi_strict_equals(env, lhs, rhs, &result), "napi_strict_equals"); return result; @@ -42,7 +41,6 @@ bool IsSameValue(const napi_env &env, const napi_value &lhs, const napi_value &r bool IsMatchType(const napi_env &env, const napi_value &value, const napi_valuetype &type) { - CALL_LOG_ENTER; napi_valuetype paramType = napi_undefined; CHKNRF(env, napi_typeof(env, value, ¶mType), "napi_typeof"); return paramType == type; @@ -50,7 +48,6 @@ bool IsMatchType(const napi_env &env, const napi_value &value, const napi_valuet bool IsMatchArrayType(const napi_env &env, const napi_value &value) { - CALL_LOG_ENTER; bool result = false; CHKNRF(env, napi_is_array(env, value, &result), "napi_is_array"); return result; @@ -58,7 +55,6 @@ bool IsMatchArrayType(const napi_env &env, const napi_value &value) bool GetFloatArray(const napi_env &env, const napi_value &value, vector &array) { - CALL_LOG_ENTER; uint32_t arrayLength = 0; CHKNRF(env, napi_get_array_length(env, value, &arrayLength), "napi_get_array_length"); for (uint32_t i = 0; i < arrayLength; ++i) { diff --git a/frameworks/native/BUILD.gn b/frameworks/native/BUILD.gn old mode 100644 new mode 100755 index 6ee82e32..b41a3377 --- a/frameworks/native/BUILD.gn +++ b/frameworks/native/BUILD.gn @@ -112,7 +112,6 @@ ohos_shared_library("sensor_interface_native") { deps = [ "$SUBSYSTEM_DIR/frameworks/native:libsensor_client", - "$SUBSYSTEM_DIR/frameworks/native:libsensor_ndk", ] external_deps = [ @@ -120,7 +119,6 @@ ohos_shared_library("sensor_interface_native") { "eventhandler:libeventhandler", "hilog:libhilog", "ipc:ipc_single", - "safwk:system_ability_fwk", ] part_name = "sensor" @@ -149,7 +147,6 @@ ohos_shared_library("ohsensor") { deps = [ "$SUBSYSTEM_DIR/frameworks/native:libsensor_client", - "$SUBSYSTEM_DIR/frameworks/native:libsensor_ndk", "$SUBSYSTEM_DIR/frameworks/native:sensor_interface_native", "$SUBSYSTEM_DIR/utils/ipc:libsensor_ipc", ] @@ -159,7 +156,6 @@ ohos_shared_library("ohsensor") { "eventhandler:libeventhandler", "hilog:libhilog", "ipc:ipc_single", - "safwk:system_ability_fwk", ] relative_install_dir = "ndk" diff --git a/frameworks/native/include/fd_listener.h b/frameworks/native/include/fd_listener.h old mode 100644 new mode 100755 index 7c4424d8..d1d61df6 --- a/frameworks/native/include/fd_listener.h +++ b/frameworks/native/include/fd_listener.h @@ -16,8 +16,6 @@ #ifndef FD_LISTENER_H #define FD_LISTENER_H -#include "file_descriptor_listener.h" - #include "sensor_data_channel.h" namespace OHOS { @@ -28,7 +26,6 @@ public: ~FdListener() = default; void OnReadable(int32_t fd) override; void OnShutdown(int32_t fd) override; - void OnException(int32_t fd) override; void SetChannel(SensorDataChannel *channel); DISALLOW_COPY_AND_MOVE(FdListener); diff --git a/frameworks/native/include/geomagnetic_field.h b/frameworks/native/include/geomagnetic_field.h old mode 100644 new mode 100755 index 1c3dd4c1..d0950135 --- a/frameworks/native/include/geomagnetic_field.h +++ b/frameworks/native/include/geomagnetic_field.h @@ -16,7 +16,6 @@ #ifndef GEOMAGNETIC_FIELD_H #define GEOMAGNETIC_FIELD_H -#include #include class GeomagneticField { diff --git a/frameworks/native/include/i_sensor_service.h b/frameworks/native/include/i_sensor_service.h index 6df89586..65fdc9af 100755 --- a/frameworks/native/include/i_sensor_service.h +++ b/frameworks/native/include/i_sensor_service.h @@ -16,11 +16,6 @@ #ifndef I_SENSOR_SERVICE_H #define I_SENSOR_SERVICE_H -#include - -#include "errors.h" -#include "iremote_broker.h" - #include "active_info.h" #include "i_sensor_client.h" #include "sensor_basic_data_channel.h" diff --git a/frameworks/native/include/sensor_agent_proxy.h b/frameworks/native/include/sensor_agent_proxy.h old mode 100644 new mode 100755 index e1e44219..58e8bd1f --- a/frameworks/native/include/sensor_agent_proxy.h +++ b/frameworks/native/include/sensor_agent_proxy.h @@ -16,14 +16,10 @@ #ifndef SENSOR_PROXY_H #define SENSOR_PROXY_H -#include -#include #include #include -#include "refbase.h" #include "singleton.h" -#include "sensor_agent_type.h" #include "sensor_data_channel.h" namespace OHOS { diff --git a/frameworks/native/include/sensor_algorithm.h b/frameworks/native/include/sensor_algorithm.h old mode 100644 new mode 100755 index 83bee7e2..a3143dad --- a/frameworks/native/include/sensor_algorithm.h +++ b/frameworks/native/include/sensor_algorithm.h @@ -16,7 +16,6 @@ #ifndef SENSOR_ALGORITHM_H #define SENSOR_ALGORITHM_H -#include #include class SensorAlgorithm { diff --git a/frameworks/native/include/sensor_client_proxy.h b/frameworks/native/include/sensor_client_proxy.h index ce9b2712..04b01f56 100755 --- a/frameworks/native/include/sensor_client_proxy.h +++ b/frameworks/native/include/sensor_client_proxy.h @@ -17,9 +17,7 @@ #define SENSOR_CLIENT_PROXY_H #include "iremote_proxy.h" -#include "nocopyable.h" -#include "i_sensor_client.h" #include "sensor_agent_type.h" namespace OHOS { diff --git a/frameworks/native/include/sensor_client_stub.h b/frameworks/native/include/sensor_client_stub.h index 4a8a3d6b..674558e3 100755 --- a/frameworks/native/include/sensor_client_stub.h +++ b/frameworks/native/include/sensor_client_stub.h @@ -17,7 +17,6 @@ #define SENSOR_CLIENT_STUB_H #include "iremote_stub.h" -#include "message_parcel.h" #include "i_sensor_client.h" diff --git a/frameworks/native/include/sensor_data_channel.h b/frameworks/native/include/sensor_data_channel.h old mode 100644 new mode 100755 index 167707c9..ddd39478 --- a/frameworks/native/include/sensor_data_channel.h +++ b/frameworks/native/include/sensor_data_channel.h @@ -16,9 +16,6 @@ #ifndef SENSOR_DATA_CHANNEL_H #define SENSOR_DATA_CHANNEL_H -#include -#include -#include #include #include "sensor_agent_type.h" diff --git a/frameworks/native/include/sensor_event_handler.h b/frameworks/native/include/sensor_event_handler.h index 710d6cd1..de421532 100755 --- a/frameworks/native/include/sensor_event_handler.h +++ b/frameworks/native/include/sensor_event_handler.h @@ -17,7 +17,6 @@ #define SENSOR_EVENT_HANDLER_H #include "event_handler.h" -#include "event_runner.h" namespace OHOS { namespace Sensors { diff --git a/frameworks/native/include/sensor_file_descriptor_listener.h b/frameworks/native/include/sensor_file_descriptor_listener.h old mode 100644 new mode 100755 index 6c2439ae..e0fbced8 --- a/frameworks/native/include/sensor_file_descriptor_listener.h +++ b/frameworks/native/include/sensor_file_descriptor_listener.h @@ -16,9 +16,6 @@ #ifndef SENSOR_FILE_DESCRIPTOR_LISTENER_H #define SENSOR_FILE_DESCRIPTOR_LISTENER_H -#include - -#include "file_descriptor_listener.h" #include "sensor_data_channel.h" namespace OHOS { @@ -29,7 +26,6 @@ public: ~SensorFileDescriptorListener(); void OnReadable(int32_t fileDescriptor) override; void OnShutdown(int32_t fileDescriptor) override; - void OnException(int32_t fileDescriptor) override; void SetChannel(SensorDataChannel *channel); void ExcuteCallback(int32_t length); diff --git a/frameworks/native/include/sensor_service_client.h b/frameworks/native/include/sensor_service_client.h index 963dc906..f07db3ee 100755 --- a/frameworks/native/include/sensor_service_client.h +++ b/frameworks/native/include/sensor_service_client.h @@ -16,20 +16,14 @@ #ifndef SENSOR_SERVICE_CLIENT_H #define SENSOR_SERVICE_CLIENT_H -#include #include -#include #include "iservice_registry.h" #include "singleton.h" -#include "active_info.h" -#include "sensor_agent_type.h" -#include "sensor_basic_data_channel.h" #include "sensor_basic_info.h" #include "sensor_client_stub.h" #include "sensor_data_channel.h" -#include "sensor.h" #include "sensor_service_proxy.h" #include "stream_socket.h" diff --git a/frameworks/native/include/sensor_service_proxy.h b/frameworks/native/include/sensor_service_proxy.h index be7fbea8..9b2eccb9 100755 --- a/frameworks/native/include/sensor_service_proxy.h +++ b/frameworks/native/include/sensor_service_proxy.h @@ -16,11 +16,8 @@ #ifndef SENSOR_SERVICE_PROXY_H #define SENSOR_SERVICE_PROXY_H -#include "errors.h" #include "iremote_proxy.h" -#include "nocopyable.h" -#include "sensor_agent_type.h" #include "i_sensor_service.h" namespace OHOS { diff --git a/frameworks/native/src/fd_listener.cpp b/frameworks/native/src/fd_listener.cpp old mode 100644 new mode 100755 index e54a94b7..807ca6d5 --- a/frameworks/native/src/fd_listener.cpp +++ b/frameworks/native/src/fd_listener.cpp @@ -15,9 +15,6 @@ #include "fd_listener.h" -#include - -#include "sensor_errors.h" #include "stream_socket.h" #undef LOG_TAG @@ -77,16 +74,5 @@ void FdListener::OnShutdown(int32_t fd) DisconnectFun disconnect = channel_->GetDisconnectFun(); disconnect(); } - -void FdListener::OnException(int32_t fd) -{ - CALL_LOG_ENTER; - if (fd < 0) { - SEN_HILOGE("Invalid fd, fd:%{public}d", fd); - } - CHKPV(channel_); - DisconnectFun disconnect = channel_->GetDisconnectFun(); - disconnect(); -} } // namespace Sensors } // namespace OHOS diff --git a/frameworks/native/src/geomagnetic_field.cpp b/frameworks/native/src/geomagnetic_field.cpp old mode 100644 new mode 100755 index d437db89..c05327c6 --- a/frameworks/native/src/geomagnetic_field.cpp +++ b/frameworks/native/src/geomagnetic_field.cpp @@ -15,10 +15,8 @@ #include "geomagnetic_field.h" -#include #include -#include "sensor_errors.h" #include "sensor_utils.h" using namespace OHOS::Sensors; diff --git a/frameworks/native/src/native_sensor.cpp b/frameworks/native/src/native_sensor.cpp old mode 100644 new mode 100755 index bd27c5f4..9a40a0f4 --- a/frameworks/native/src/native_sensor.cpp +++ b/frameworks/native/src/native_sensor.cpp @@ -13,8 +13,6 @@ * limitations under the License. */ -#include "oh_sensor.h" - #include "i_sensor_service.h" #include "native_sensor_impl.h" #include "securec.h" diff --git a/frameworks/native/src/sensor_agent_proxy.cpp b/frameworks/native/src/sensor_agent_proxy.cpp old mode 100644 new mode 100755 index 61cdfb01..caeb154d --- a/frameworks/native/src/sensor_agent_proxy.cpp +++ b/frameworks/native/src/sensor_agent_proxy.cpp @@ -15,11 +15,7 @@ #include "sensor_agent_proxy.h" -#include - #include "print_sensor_data.h" -#include "securec.h" -#include "sensor_errors.h" #include "sensor_service_client.h" #undef LOG_TAG #define LOG_TAG "SensorAgentProxy" diff --git a/frameworks/native/src/sensor_algorithm.cpp b/frameworks/native/src/sensor_algorithm.cpp old mode 100644 new mode 100755 index be96d336..bf275d8d --- a/frameworks/native/src/sensor_algorithm.cpp +++ b/frameworks/native/src/sensor_algorithm.cpp @@ -14,9 +14,6 @@ */ #include "sensor_algorithm.h" -#include -#include - #include "sensor_errors.h" #include "sensor_utils.h" diff --git a/frameworks/native/src/sensor_client_stub.cpp b/frameworks/native/src/sensor_client_stub.cpp old mode 100644 new mode 100755 index d51e7382..6a6f4435 --- a/frameworks/native/src/sensor_client_stub.cpp +++ b/frameworks/native/src/sensor_client_stub.cpp @@ -15,7 +15,6 @@ #include "sensor_client_stub.h" -#include "message_parcel.h" #include "sensor_log.h" #undef LOG_TAG diff --git a/frameworks/native/src/sensor_data_channel.cpp b/frameworks/native/src/sensor_data_channel.cpp old mode 100644 new mode 100755 index 372178fa..8d3109e7 --- a/frameworks/native/src/sensor_data_channel.cpp +++ b/frameworks/native/src/sensor_data_channel.cpp @@ -13,10 +13,6 @@ * limitations under the License. */ -#include "sensor_data_channel.h" - -#include "errors.h" - #include "fd_listener.h" #include "sensor_errors.h" #include "sensor_file_descriptor_listener.h" diff --git a/frameworks/native/src/sensor_file_descriptor_listener.cpp b/frameworks/native/src/sensor_file_descriptor_listener.cpp old mode 100644 new mode 100755 index 6d9eeca2..074ee3af --- a/frameworks/native/src/sensor_file_descriptor_listener.cpp +++ b/frameworks/native/src/sensor_file_descriptor_listener.cpp @@ -15,10 +15,7 @@ #include "sensor_file_descriptor_listener.h" #include "print_sensor_data.h" -#include "sensor_agent_type.h" -#include "sensor_basic_data_channel.h" #include "sensor_errors.h" -#include "sys/socket.h" #undef LOG_TAG #define LOG_TAG "SensorFileDescriptorListener" @@ -102,18 +99,5 @@ void SensorFileDescriptorListener::OnShutdown(int32_t fileDescriptor) CHKPV(channel_); channel_->DestroySensorDataChannel(); } - -void SensorFileDescriptorListener::OnException(int32_t fileDescriptor) -{ - if (fileDescriptor < 0) { - SEN_HILOGE("Invalid fd:%{public}d", fileDescriptor); - } - if (receiveDataBuff_ != nullptr) { - delete[] receiveDataBuff_; - receiveDataBuff_ = nullptr; - } - CHKPV(channel_); - channel_->DestroySensorDataChannel(); -} } // namespace Sensors } // namespace OHOS \ No newline at end of file diff --git a/frameworks/native/src/sensor_service_client.cpp b/frameworks/native/src/sensor_service_client.cpp old mode 100644 new mode 100755 index b52e2897..e2a6d7b2 --- a/frameworks/native/src/sensor_service_client.cpp +++ b/frameworks/native/src/sensor_service_client.cpp @@ -15,11 +15,6 @@ #include "sensor_service_client.h" -#include -#include -#include -#include - #include "death_recipient_template.h" #ifdef HIVIEWDFX_HISYSEVENT_ENABLE #include "hisysevent.h" @@ -27,12 +22,8 @@ #ifdef HIVIEWDFX_HITRACE_ENABLE #include "hitrace_meter.h" #endif // HIVIEWDFX_HITRACE_ENABLE -#include "ipc_skeleton.h" #include "sensor_agent_proxy.h" -#include "sensor_errors.h" -#include "sensor_service_proxy.h" #include "system_ability_definition.h" -#include "rust_binding.h" #undef LOG_TAG #define LOG_TAG "SensorServiceClient" diff --git a/frameworks/native/src/sensor_service_proxy.cpp b/frameworks/native/src/sensor_service_proxy.cpp old mode 100644 new mode 100755 index b9b2b3d9..b15ea113 --- a/frameworks/native/src/sensor_service_proxy.cpp +++ b/frameworks/native/src/sensor_service_proxy.cpp @@ -15,14 +15,9 @@ #include "sensor_service_proxy.h" -#include - #ifdef HIVIEWDFX_HISYSEVENT_ENABLE #include "hisysevent.h" #endif // HIVIEWDFX_HISYSEVENT_ENABLE -#include "message_parcel.h" -#include "sensor_client_proxy.h" -#include "sensor_errors.h" #include "sensor_parcel.h" #undef LOG_TAG diff --git a/services/BUILD.gn b/services/BUILD.gn old mode 100644 new mode 100755 index db5914a2..5678fbec --- a/services/BUILD.gn +++ b/services/BUILD.gn @@ -75,7 +75,6 @@ ohos_shared_library("libsensor_service") { "hilog:libhilog", "ipc:ipc_single", "safwk:system_ability_fwk", - "samgr:samgr_proxy", ] if (sensor_memmgr_enable) { @@ -188,7 +187,6 @@ ohos_static_library("libsensor_service_static") { "hilog:libhilog", "ipc:ipc_single", "safwk:system_ability_fwk", - "samgr:samgr_proxy", ] if (sensor_memmgr_enable) { diff --git a/services/hdi_connection/adapter/include/sensor_event_callback.h b/services/hdi_connection/adapter/include/sensor_event_callback.h old mode 100644 new mode 100755 index 90ce52fe..46b5d1b9 --- a/services/hdi_connection/adapter/include/sensor_event_callback.h +++ b/services/hdi_connection/adapter/include/sensor_event_callback.h @@ -19,8 +19,6 @@ #include "v2_1/isensor_callback.h" #include "v2_1/sensor_types.h" -#include "sensor_data_event.h" - using OHOS::HDI::Sensor::V2_1::HdfSensorEvents; using OHOS::HDI::Sensor::V2_1::ISensorCallback; diff --git a/services/hdi_connection/adapter/src/compatible_connection.cpp b/services/hdi_connection/adapter/src/compatible_connection.cpp old mode 100644 new mode 100755 index 9c07aa2a..a368fda1 --- a/services/hdi_connection/adapter/src/compatible_connection.cpp +++ b/services/hdi_connection/adapter/src/compatible_connection.cpp @@ -14,8 +14,6 @@ */ #include "compatible_connection.h" -#include - #include "securec.h" #include "sensor_errors.h" diff --git a/services/hdi_connection/adapter/src/hdi_connection.cpp b/services/hdi_connection/adapter/src/hdi_connection.cpp old mode 100644 new mode 100755 index a30e0c34..bdca2348 --- a/services/hdi_connection/adapter/src/hdi_connection.cpp +++ b/services/hdi_connection/adapter/src/hdi_connection.cpp @@ -15,7 +15,6 @@ #include "hdi_connection.h" #include -#include #include #ifdef HIVIEWDFX_HISYSEVENT_ENABLE diff --git a/services/hdi_connection/adapter/src/sensor_event_callback.cpp b/services/hdi_connection/adapter/src/sensor_event_callback.cpp old mode 100644 new mode 100755 index 091af57c..d99d3080 --- a/services/hdi_connection/adapter/src/sensor_event_callback.cpp +++ b/services/hdi_connection/adapter/src/sensor_event_callback.cpp @@ -18,7 +18,6 @@ #include "hdi_connection.h" #include "print_sensor_data.h" -#include "sensor_agent_type.h" #include "sensor_errors.h" #undef LOG_TAG diff --git a/services/hdi_connection/hardware/include/hdi_service_impl.h b/services/hdi_connection/hardware/include/hdi_service_impl.h old mode 100644 new mode 100755 index 50e6101b..49b0191c --- a/services/hdi_connection/hardware/include/hdi_service_impl.h +++ b/services/hdi_connection/hardware/include/hdi_service_impl.h @@ -16,9 +16,7 @@ #ifndef HDI_SERVICE_IMPL_H #define HDI_SERVICE_IMPL_H -#include #include -#include #include "sensor_agent_type.h" #include "singleton.h" diff --git a/services/hdi_connection/hardware/src/hdi_service_impl.cpp b/services/hdi_connection/hardware/src/hdi_service_impl.cpp old mode 100644 new mode 100755 index 1021cffa..bf1c15e9 --- a/services/hdi_connection/hardware/src/hdi_service_impl.cpp +++ b/services/hdi_connection/hardware/src/hdi_service_impl.cpp @@ -14,11 +14,8 @@ */ #include "hdi_service_impl.h" -#include #include #include -#include -#include #include "sensor_errors.h" diff --git a/services/hdi_connection/interface/include/i_sensor_hdi_connection.h b/services/hdi_connection/interface/include/i_sensor_hdi_connection.h old mode 100644 new mode 100755 index 06a53f44..5997a9b6 --- a/services/hdi_connection/interface/include/i_sensor_hdi_connection.h +++ b/services/hdi_connection/interface/include/i_sensor_hdi_connection.h @@ -16,7 +16,6 @@ #ifndef I_SENSOR_HDI_CONNECTION_H #define I_SENSOR_HDI_CONNECTION_H -#include #include #include "report_data_callback.h" #include "sensor.h" diff --git a/services/hdi_connection/interface/include/sensor_hdi_connection.h b/services/hdi_connection/interface/include/sensor_hdi_connection.h old mode 100644 new mode 100755 index 67c14bb4..df45cfd3 --- a/services/hdi_connection/interface/include/sensor_hdi_connection.h +++ b/services/hdi_connection/interface/include/sensor_hdi_connection.h @@ -16,7 +16,6 @@ #ifndef SENSOR_HDI_CONNECTION_H #define SENSOR_HDI_CONNECTION_H -#include #include #include "i_sensor_hdi_connection.h" diff --git a/services/include/client_info.h b/services/include/client_info.h old mode 100644 new mode 100755 index 5187e570..f0b76b40 --- a/services/include/client_info.h +++ b/services/include/client_info.h @@ -19,22 +19,16 @@ #include #include #include -#include -#include -#include -#include "refbase.h" #include "singleton.h" #include "accesstoken_kit.h" #include "iremote_object.h" -#include "nocopyable.h" #include "app_thread_info.h" #include "sensor_basic_data_channel.h" #include "sensor_basic_info.h" #include "sensor_channel_info.h" -#include "sensor_data_event.h" namespace OHOS { namespace Sensors { diff --git a/services/include/fifo_cache_data.h b/services/include/fifo_cache_data.h old mode 100644 new mode 100755 index b459a32c..f95dcdf2 --- a/services/include/fifo_cache_data.h +++ b/services/include/fifo_cache_data.h @@ -16,11 +16,7 @@ #ifndef FIFO_CACHE_DATA_H #define FIFO_CACHE_DATA_H -#include - -#include "nocopyable.h" #include "refbase.h" -#include "sensor_data_event.h" #include "sensor_basic_data_channel.h" namespace OHOS { diff --git a/services/include/flush_info_record.h b/services/include/flush_info_record.h old mode 100644 new mode 100755 index 02b77689..003e676e --- a/services/include/flush_info_record.h +++ b/services/include/flush_info_record.h @@ -16,17 +16,8 @@ #ifndef FLUSH_INFO_RECORD_H #define FLUSH_INFO_RECORD_H -#include -#include -#include - -#include "nocopyable.h" -#include "refbase.h" -#include "singleton.h" - #include "client_info.h" #include "sensor_agent_type.h" -#include "sensor_basic_data_channel.h" #include "sensor_errors.h" #ifdef HDF_DRIVERS_INTERFACE_SENSOR #include "sensor_hdi_connection.h" diff --git a/services/include/sensor_data_processer.h b/services/include/sensor_data_processer.h index c0794915..c344aee3 100755 --- a/services/include/sensor_data_processer.h +++ b/services/include/sensor_data_processer.h @@ -16,23 +16,15 @@ #ifndef SENSORS_DATA_PROCESSER_H #define SENSORS_DATA_PROCESSER_H -#include -#include - -#include "refbase.h" - -#include "nocopyable.h" - -#include "client_info.h" #include "fifo_cache_data.h" #include "flush_info_record.h" -#include "report_data_callback.h" -#include "sensor.h" #include "sensor_hdi_connection.h" -#include "sensor_data_event.h" namespace OHOS { namespace Sensors { +namespace { + std::unordered_map sensorMap_; +} class SensorDataProcesser : public RefBase { public: explicit SensorDataProcesser(const std::unordered_map &sensorMap); @@ -60,7 +52,6 @@ private: std::mutex dataCountMutex_; std::unordered_map>> dataCountMap_; std::mutex sensorMutex_; - std::unordered_map sensorMap_; }; } // namespace Sensors } // namespace OHOS diff --git a/services/include/sensor_dump.h b/services/include/sensor_dump.h old mode 100644 new mode 100755 index 98df5086..62e29e74 --- a/services/include/sensor_dump.h +++ b/services/include/sensor_dump.h @@ -16,12 +16,6 @@ #ifndef SENSOR_DUMP_H #define SENSOR_DUMP_H -#include - -#include "singleton.h" - -#include "nocopyable.h" - #include "client_info.h" #include "sensor.h" #include "sensor_agent_type.h" diff --git a/services/include/sensor_manager.h b/services/include/sensor_manager.h old mode 100644 new mode 100755 index acc8c879..14661e76 --- a/services/include/sensor_manager.h +++ b/services/include/sensor_manager.h @@ -16,15 +16,10 @@ #ifndef SENSOR_MANAGER_H #define SENSOR_MANAGER_H -#include #include -#include -#include "client_info.h" -#include "flush_info_record.h" #ifdef HDF_DRIVERS_INTERFACE_SENSOR #include "sensor_data_processer.h" -#include "sensor_hdi_connection.h" #else #include "sensor.h" #endif // HDF_DRIVERS_INTERFACE_SENSOR @@ -57,7 +52,6 @@ private: sptr reportDataCallback_ = nullptr; #endif // HDF_DRIVERS_INTERFACE_SENSOR ClientInfo &clientInfo_ = ClientInfo::GetInstance(); - std::unordered_map sensorMap_; std::mutex sensorMapMutex_; }; } // namespace Sensors diff --git a/services/include/sensor_power_policy.h b/services/include/sensor_power_policy.h old mode 100644 new mode 100755 index e8333b8d..c8be3166 --- a/services/include/sensor_power_policy.h +++ b/services/include/sensor_power_policy.h @@ -16,15 +16,7 @@ #ifndef SENSOR_POWER_POLICY_H #define SENSOR_POWER_POLICY_H -#include -#include -#include - -#include "nocopyable.h" - #include "active_info.h" -#include "client_info.h" -#include "sensor_errors.h" #include "sensor_manager.h" #include "stream_session.h" #ifdef HDF_DRIVERS_INTERFACE_SENSOR diff --git a/services/include/sensor_service.h b/services/include/sensor_service.h old mode 100644 new mode 100755 index 8d6e509b..9a3f83f5 --- a/services/include/sensor_service.h +++ b/services/include/sensor_service.h @@ -16,18 +16,10 @@ #ifndef SENSOR_SERVICE_H #define SENSOR_SERVICE_H -#include -#include -#include - -#include "nocopyable.h" #include "system_ability.h" -#include "client_info.h" #include "death_recipient_template.h" -#include "sensor_data_event.h" #include "sensor_delayed_sp_singleton.h" -#include "sensor_manager.h" #include "sensor_power_policy.h" #include "sensor_service_stub.h" #include "stream_server.h" @@ -99,7 +91,6 @@ private: std::mutex sensorsMutex_; std::mutex sensorMapMutex_; std::vector sensors_; - std::unordered_map sensorMap_; #ifdef HDF_DRIVERS_INTERFACE_SENSOR bool InitInterface(); bool InitDataCallback(); diff --git a/services/include/sensor_service_stub.h b/services/include/sensor_service_stub.h old mode 100644 new mode 100755 index c799965d..793f0b93 --- a/services/include/sensor_service_stub.h +++ b/services/include/sensor_service_stub.h @@ -17,8 +17,6 @@ #define SENSOR_SERVICE_STUB_H #include "iremote_stub.h" -#include "message_parcel.h" -#include "nocopyable.h" #include "i_sensor_service.h" diff --git a/services/include/stream_server.h b/services/include/stream_server.h old mode 100644 new mode 100755 index c97f3a93..5605e8b5 --- a/services/include/stream_server.h +++ b/services/include/stream_server.h @@ -16,7 +16,6 @@ #ifndef STREAM_SERVER_H #define STREAM_SERVER_H -#include #include #include "stream_session.h" diff --git a/services/src/client_info.cpp b/services/src/client_info.cpp old mode 100644 new mode 100755 index db983ce0..e683b059 --- a/services/src/client_info.cpp +++ b/services/src/client_info.cpp @@ -13,13 +13,8 @@ * limitations under the License. */ -#include "client_info.h" - -#include - #include "permission_util.h" #include "securec.h" -#include "sensor_errors.h" #include "sensor_manager.h" #ifdef HDF_DRIVERS_INTERFACE_SENSOR #include "sensor_hdi_connection.h" diff --git a/services/src/flush_info_record.cpp b/services/src/flush_info_record.cpp old mode 100644 new mode 100755 index b39c1495..799a8f23 --- a/services/src/flush_info_record.cpp +++ b/services/src/flush_info_record.cpp @@ -15,8 +15,6 @@ #include "flush_info_record.h" -#include "sensor_errors.h" - #undef LOG_TAG #define LOG_TAG "FlushInfoRecord" diff --git a/services/src/sensor_data_processer.cpp b/services/src/sensor_data_processer.cpp index 6574c235..c008752d 100755 --- a/services/src/sensor_data_processer.cpp +++ b/services/src/sensor_data_processer.cpp @@ -18,17 +18,11 @@ #include #include #include -#include #ifdef HIVIEWDFX_HISYSEVENT_ENABLE #include "hisysevent.h" #endif // HIVIEWDFX_HISYSEVENT_ENABLE #include "print_sensor_data.h" -#include "permission_util.h" -#include "securec.h" -#include "sensor_basic_data_channel.h" -#include "sensor_errors.h" -#include "system_ability_definition.h" #undef LOG_TAG #define LOG_TAG "SensorDataProcesser" diff --git a/services/src/sensor_dump.cpp b/services/src/sensor_dump.cpp old mode 100644 new mode 100755 index 767222bb..bc6f670f --- a/services/src/sensor_dump.cpp +++ b/services/src/sensor_dump.cpp @@ -18,12 +18,8 @@ #include #include -#include -#include -#include #include "securec.h" -#include "sensor_agent_type.h" #include "sensor_errors.h" #undef LOG_TAG diff --git a/services/src/sensor_manager.cpp b/services/src/sensor_manager.cpp old mode 100644 new mode 100755 index 50cb8580..2899a683 --- a/services/src/sensor_manager.cpp +++ b/services/src/sensor_manager.cpp @@ -17,11 +17,7 @@ #include -#include "iservice_registry.h" - -#include "sensor.h" -#include "sensor_data_event.h" -#include "sensor_errors.h" +#include "sensor_data_processer.h" #undef LOG_TAG #define LOG_TAG "SensorManager" diff --git a/services/src/sensor_power_policy.cpp b/services/src/sensor_power_policy.cpp old mode 100644 new mode 100755 index 2debb6c2..f4adf2a9 --- a/services/src/sensor_power_policy.cpp +++ b/services/src/sensor_power_policy.cpp @@ -15,8 +15,6 @@ #include "sensor_power_policy.h" -#include "sensor.h" -#include "sensor_agent_type.h" #ifdef OHOS_BUILD_ENABLE_RUST #include "rust_binding.h" #endif // OHOS_BUILD_ENABLE_RUST diff --git a/services/src/sensor_service.cpp b/services/src/sensor_service.cpp old mode 100644 new mode 100755 index 2f86564c..5cbb4742 --- a/services/src/sensor_service.cpp +++ b/services/src/sensor_service.cpp @@ -17,23 +17,18 @@ #include #include -#include -#include #ifdef HIVIEWDFX_HISYSEVENT_ENABLE #include "hisysevent.h" #endif // HIVIEWDFX_HISYSEVENT_ENABLE -#include "iservice_registry.h" #ifdef MEMMGR_ENABLE #include "mem_mgr_client.h" #endif // MEMMGR_ENABLE #include "permission_util.h" #include "print_sensor_data.h" -#include "securec.h" -#include "sensor.h" +#include "sensor_data_processer.h" #include "sensor_dump.h" -#include "sensor_errors.h" #include "system_ability_definition.h" #undef LOG_TAG diff --git a/services/src/sensor_service_stub.cpp b/services/src/sensor_service_stub.cpp old mode 100644 new mode 100755 index 36a679fb..c5af8e28 --- a/services/src/sensor_service_stub.cpp +++ b/services/src/sensor_service_stub.cpp @@ -15,21 +15,15 @@ #include "sensor_service_stub.h" -#include -#include #include -#include -#include #include "accesstoken_kit.h" #ifdef HIVIEWDFX_HISYSEVENT_ENABLE #include "hisysevent.h" #endif // HIVIEWDFX_HISYSEVENT_ENABLE #include "ipc_skeleton.h" -#include "message_parcel.h" #include "permission_util.h" #include "sensor_client_proxy.h" -#include "sensor_errors.h" #include "sensor_parcel.h" #undef LOG_TAG diff --git a/utils/common/include/permission_util.h b/utils/common/include/permission_util.h old mode 100644 new mode 100755 index b073d147..49223da5 --- a/utils/common/include/permission_util.h +++ b/utils/common/include/permission_util.h @@ -16,9 +16,6 @@ #ifndef PERMISSION_UTIL_H #define PERMISSION_UTIL_H -#include -#include - #include "access_token.h" #include "singleton.h" diff --git a/utils/common/include/sensor.h b/utils/common/include/sensor.h old mode 100644 new mode 100755 index f51ed758..ebcad9e2 --- a/utils/common/include/sensor.h +++ b/utils/common/include/sensor.h @@ -16,9 +16,6 @@ #ifndef SENSOR_H #define SENSOR_H -#include -#include - #include "parcel.h" namespace OHOS { diff --git a/utils/common/include/sensor_basic_data_channel.h b/utils/common/include/sensor_basic_data_channel.h old mode 100644 new mode 100755 index 4cfbe60a..c354107b --- a/utils/common/include/sensor_basic_data_channel.h +++ b/utils/common/include/sensor_basic_data_channel.h @@ -17,10 +17,8 @@ #define SENSOR_BASIC_DATA_CHANNEL_H #include -#include #include "message_parcel.h" -#include "refbase.h" #include "sensor_data_event.h" diff --git a/utils/common/include/sensor_channel_info.h b/utils/common/include/sensor_channel_info.h old mode 100644 new mode 100755 index 8f39d221..f988b678 --- a/utils/common/include/sensor_channel_info.h +++ b/utils/common/include/sensor_channel_info.h @@ -16,9 +16,7 @@ #ifndef SENSOR_CHANNEL_INFO_H #define SENSOR_CHANNEL_INFO_H -#include #include -#include namespace OHOS { namespace Sensors { diff --git a/utils/common/include/sensor_errors.h b/utils/common/include/sensor_errors.h old mode 100644 new mode 100755 index 7a4acd2e..c95ba190 --- a/utils/common/include/sensor_errors.h +++ b/utils/common/include/sensor_errors.h @@ -19,8 +19,6 @@ #include #include -#include "hilog/log.h" - namespace OHOS { namespace Sensors { constexpr uint32_t MAX_SENSOR_COUNT = 200; diff --git a/utils/common/src/print_sensor_data.cpp b/utils/common/src/print_sensor_data.cpp old mode 100644 new mode 100755 index 1d1e5140..208472d9 --- a/utils/common/src/print_sensor_data.cpp +++ b/utils/common/src/print_sensor_data.cpp @@ -15,9 +15,6 @@ #include "print_sensor_data.h" -#include -#include - #ifdef HIVIEWDFX_HISYSEVENT_ENABLE #include "hisysevent.h" #endif // HIVIEWDFX_HISYSEVENT_ENABLE diff --git a/utils/ipc/include/net_packet.h b/utils/ipc/include/net_packet.h old mode 100644 new mode 100755 index c12bc9ab..d1ca30d1 --- a/utils/ipc/include/net_packet.h +++ b/utils/ipc/include/net_packet.h @@ -16,7 +16,6 @@ #ifndef NET_PACKET_H #define NET_PACKET_H -#include "proto.h" #include "stream_buffer.h" #undef LOG_TAG diff --git a/utils/ipc/include/proto.h b/utils/ipc/include/proto.h old mode 100644 new mode 100755 index ae5a8b1c..38bed9c4 --- a/utils/ipc/include/proto.h +++ b/utils/ipc/include/proto.h @@ -16,8 +16,6 @@ #ifndef PROTO_H #define PROTO_H -#include - namespace OHOS { namespace Sensors { static constexpr size_t SEND_RETRY_LIMIT = 32; diff --git a/utils/ipc/include/stream_buffer.h b/utils/ipc/include/stream_buffer.h old mode 100644 new mode 100755 index 8db8a871..0bc6f66b --- a/utils/ipc/include/stream_buffer.h +++ b/utils/ipc/include/stream_buffer.h @@ -17,7 +17,6 @@ #define STREAM_BUFFER_H #include -#include #include "nocopyable.h" #include "securec.h" diff --git a/utils/ipc/include/stream_session.h b/utils/ipc/include/stream_session.h old mode 100644 new mode 100755 index e29a2ea8..031acd17 --- a/utils/ipc/include/stream_session.h +++ b/utils/ipc/include/stream_session.h @@ -19,10 +19,8 @@ #include #include "accesstoken_kit.h" -#include "nocopyable.h" #include "net_packet.h" -#include "proto.h" #ifdef OHOS_BUILD_ENABLE_RUST #include "rust_binding.h" #endif // OHOS_BUILD_ENABLE_RUST diff --git a/utils/ipc/include/stream_socket.h b/utils/ipc/include/stream_socket.h old mode 100644 new mode 100755 index 3a445568..b3593041 --- a/utils/ipc/include/stream_socket.h +++ b/utils/ipc/include/stream_socket.h @@ -16,13 +16,9 @@ #ifndef STREAM_SOCKET_H #define STREAM_SOCKET_H -#include - #include #include -#include "nocopyable.h" - #include "circle_stream_buffer.h" #include "net_packet.h" #ifdef OHOS_BUILD_ENABLE_RUST diff --git a/utils/ipc/src/circle_stream_buffer.cpp b/utils/ipc/src/circle_stream_buffer.cpp old mode 100644 new mode 100755 index 11235319..f861b676 --- a/utils/ipc/src/circle_stream_buffer.cpp +++ b/utils/ipc/src/circle_stream_buffer.cpp @@ -15,8 +15,6 @@ #include "circle_stream_buffer.h" -#include "sensor_errors.h" - namespace OHOS { namespace Sensors { bool CircleStreamBuffer::CheckWrite(size_t size) diff --git a/utils/ipc/src/net_packet.cpp b/utils/ipc/src/net_packet.cpp old mode 100644 new mode 100755 index 309bdc20..d58775e3 --- a/utils/ipc/src/net_packet.cpp +++ b/utils/ipc/src/net_packet.cpp @@ -15,8 +15,6 @@ #include "net_packet.h" -#include "sensor_errors.h" - namespace OHOS { namespace Sensors { NetPacket::NetPacket(MessageId msgId) : msgId_(msgId) diff --git a/utils/ipc/src/stream_session.cpp b/utils/ipc/src/stream_session.cpp old mode 100644 new mode 100755 index 39f0b8c4..a5ebe797 --- a/utils/ipc/src/stream_session.cpp +++ b/utils/ipc/src/stream_session.cpp @@ -15,11 +15,8 @@ #include "stream_session.h" -#include #include -#include "proto.h" -#include "sensor_errors.h" #include "stream_socket.h" #undef LOG_TAG diff --git a/utils/ipc/src/stream_socket.cpp b/utils/ipc/src/stream_socket.cpp old mode 100644 new mode 100755 index e77dbb1d..4ea480d6 --- a/utils/ipc/src/stream_socket.cpp +++ b/utils/ipc/src/stream_socket.cpp @@ -15,9 +15,6 @@ #include "stream_socket.h" -#include - -#include "sensor_errors.h" namespace OHOS { namespace Sensors { -- Gitee