From e9a3fbdae492e02dffe45af9ea013130481407f3 Mon Sep 17 00:00:00 2001 From: Arthur Ishiguro Date: Thu, 8 Feb 2024 19:24:11 +0000 Subject: [PATCH] Add debug logs to enable dynamic sensor Bug: 298450041 Test: None Change-Id: Ibe1a49a38a05ecfb623c64fb48c812cc422a54e3 --- modules/sensors/dynamic_sensor/HidRawSensor.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/sensors/dynamic_sensor/HidRawSensor.cpp b/modules/sensors/dynamic_sensor/HidRawSensor.cpp index 5baa0068..b61185dc 100644 --- a/modules/sensors/dynamic_sensor/HidRawSensor.cpp +++ b/modules/sensors/dynamic_sensor/HidRawSensor.cpp @@ -988,10 +988,12 @@ int HidRawSensor::enable(bool enable) { SP(HidDevice) device = PROMOTE(mDevice); if (device == nullptr) { + LOG_E << "enable: no device" << LOG_ENDL; return NO_INIT; } if (enable == mEnabled) { + LOG_D << "enable: already in desired state" << LOG_ENDL; return NO_ERROR; } @@ -1000,8 +1002,10 @@ int HidRawSensor::enable(bool enable) { bool setReportingOk = setReportingState(device, enable); if (setPowerOk && setReportingOk && setLeAudioTransportOk) { mEnabled = enable; + LOG_I << "enable: success" << LOG_ENDL; return NO_ERROR; } else { + LOG_E << "enable: set feature failed" << LOG_ENDL; return INVALID_OPERATION; } }