Add aidl method for removing individual sensor privacy listener
Since a single listener can be registered for multiple sensors they
should be able to be removed individually.
Test: Build
Bug: 181681375
Change-Id: I6055e89fefe93e0f67c86becccde0259c4d4ea1b
diff --git a/libs/sensorprivacy/SensorPrivacyManager.cpp b/libs/sensorprivacy/SensorPrivacyManager.cpp
index b3537ce..ef3ceda 100644
--- a/libs/sensorprivacy/SensorPrivacyManager.cpp
+++ b/libs/sensorprivacy/SensorPrivacyManager.cpp
@@ -100,6 +100,15 @@
}
}
+void SensorPrivacyManager::removeIndividualSensorPrivacyListener(int sensor,
+ const sp<hardware::ISensorPrivacyListener>& listener)
+{
+ sp<hardware::ISensorPrivacyManager> service = getService();
+ if (service != nullptr) {
+ service->removeIndividualSensorPrivacyListener(sensor, listener);
+ }
+}
+
bool SensorPrivacyManager::isSensorPrivacyEnabled()
{
sp<hardware::ISensorPrivacyManager> service = getService();