summaryrefslogtreecommitdiff
path: root/libs/sensorprivacy/SensorPrivacyManager.cpp
diff options
context:
space:
mode:
authorEvan Severson <evanseverson@google.com>2021-05-19 16:10:29 -0700
committerEvan Severson <evanseverson@google.com>2021-05-20 20:49:47 +0000
commit7bfa35e358886412b432cb732478e5ee87a716fc (patch)
treec28208b32d8c7d2cf52ed0921e2f76a299ecca85 /libs/sensorprivacy/SensorPrivacyManager.cpp
parentd01b8e9a565f9c68dd19d02960e2937d8a052695 (diff)
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
Diffstat (limited to 'libs/sensorprivacy/SensorPrivacyManager.cpp')
-rw-r--r--libs/sensorprivacy/SensorPrivacyManager.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/libs/sensorprivacy/SensorPrivacyManager.cpp b/libs/sensorprivacy/SensorPrivacyManager.cpp
index b3537ce444..ef3ceda07c 100644
--- a/libs/sensorprivacy/SensorPrivacyManager.cpp
+++ b/libs/sensorprivacy/SensorPrivacyManager.cpp
@@ -100,6 +100,15 @@ void SensorPrivacyManager::removeSensorPrivacyListener(
}
}
+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();