From 762bfd2671218525a1d6cdb5e0aead7aa1676009 Mon Sep 17 00:00:00 2001 From: wuzhihuitmac Date: Sat, 23 Aug 2025 11:41:49 +0800 Subject: [PATCH] Reset the status about sensorServer_ Signed-off-by: wuzhihuitmac Change-Id: Ic069b602b6d222b370138b8f459ab484adbef5b7 --- frameworks/native/src/sensor_service_client.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/frameworks/native/src/sensor_service_client.cpp b/frameworks/native/src/sensor_service_client.cpp index 42b72118..1e1a5796 100644 --- a/frameworks/native/src/sensor_service_client.cpp +++ b/frameworks/native/src/sensor_service_client.cpp @@ -77,6 +77,7 @@ int32_t SensorServiceClient::DealAfterServiceAlive() ret = TransferClientRemoteObject(); if (ret != ERR_OK) { SEN_HILOGE("TransferClientRemoteObject failed, ret:%{public}d", ret); + sensorServer_ = nullptr; } return ret; } @@ -143,6 +144,7 @@ bool SensorServiceClient::LoadSensorService() int32_t ret = DealAfterServiceAlive(); if (ret != ERR_OK) { SEN_HILOGE("DealAfterServiceAlive failed, ret:%{public}d", ret); + sensorServer_ = nullptr; return false; } return true; -- Gitee