Loading libs/sensorprivacy/SensorPrivacyManager.cpp +18 −0 Original line number Diff line number Diff line Loading @@ -85,4 +85,22 @@ bool SensorPrivacyManager::isSensorPrivacyEnabled() return false; } status_t SensorPrivacyManager::linkToDeath(const sp<IBinder::DeathRecipient>& recipient) { sp<hardware::ISensorPrivacyManager> service = getService(); if (service != nullptr) { return IInterface::asBinder(service)->linkToDeath(recipient); } return INVALID_OPERATION; } status_t SensorPrivacyManager::unlinkToDeath(const sp<IBinder::DeathRecipient>& recipient) { sp<hardware::ISensorPrivacyManager> service = getService(); if (service != nullptr) { return IInterface::asBinder(service)->unlinkToDeath(recipient); } return INVALID_OPERATION; } }; // namespace android libs/sensorprivacy/include/sensorprivacy/SensorPrivacyManager.h +3 −0 Original line number Diff line number Diff line Loading @@ -34,6 +34,9 @@ public: void removeSensorPrivacyListener(const sp<hardware::ISensorPrivacyListener>& listener); bool isSensorPrivacyEnabled(); status_t linkToDeath(const sp<IBinder::DeathRecipient>& recipient); status_t unlinkToDeath(const sp<IBinder::DeathRecipient>& recipient); private: Mutex mLock; sp<hardware::ISensorPrivacyManager> mService; Loading Loading
libs/sensorprivacy/SensorPrivacyManager.cpp +18 −0 Original line number Diff line number Diff line Loading @@ -85,4 +85,22 @@ bool SensorPrivacyManager::isSensorPrivacyEnabled() return false; } status_t SensorPrivacyManager::linkToDeath(const sp<IBinder::DeathRecipient>& recipient) { sp<hardware::ISensorPrivacyManager> service = getService(); if (service != nullptr) { return IInterface::asBinder(service)->linkToDeath(recipient); } return INVALID_OPERATION; } status_t SensorPrivacyManager::unlinkToDeath(const sp<IBinder::DeathRecipient>& recipient) { sp<hardware::ISensorPrivacyManager> service = getService(); if (service != nullptr) { return IInterface::asBinder(service)->unlinkToDeath(recipient); } return INVALID_OPERATION; } }; // namespace android
libs/sensorprivacy/include/sensorprivacy/SensorPrivacyManager.h +3 −0 Original line number Diff line number Diff line Loading @@ -34,6 +34,9 @@ public: void removeSensorPrivacyListener(const sp<hardware::ISensorPrivacyListener>& listener); bool isSensorPrivacyEnabled(); status_t linkToDeath(const sp<IBinder::DeathRecipient>& recipient); status_t unlinkToDeath(const sp<IBinder::DeathRecipient>& recipient); private: Mutex mLock; sp<hardware::ISensorPrivacyManager> mService; Loading