Loading services/camera/libcameraservice/CameraService.cpp +5 −8 Original line number Diff line number Diff line Loading @@ -56,7 +56,6 @@ #include <media/IMediaHTTPService.h> #include <media/mediaplayer.h> #include <mediautils/BatteryNotifier.h> #include <sensorprivacy/SensorPrivacyManager.h> #include <utils/Errors.h> #include <utils/Log.h> #include <utils/String16.h> Loading Loading @@ -3258,10 +3257,9 @@ void CameraService::SensorPrivacyPolicy::registerSelf() { if (mRegistered) { return; } SensorPrivacyManager spm; spm.addSensorPrivacyListener(this); mSensorPrivacyEnabled = spm.isSensorPrivacyEnabled(); status_t res = spm.linkToDeath(this); mSpm.addSensorPrivacyListener(this); mSensorPrivacyEnabled = mSpm.isSensorPrivacyEnabled(); status_t res = mSpm.linkToDeath(this); if (res == OK) { mRegistered = true; ALOGV("SensorPrivacyPolicy: Registered with SensorPrivacyManager"); Loading @@ -3270,9 +3268,8 @@ void CameraService::SensorPrivacyPolicy::registerSelf() { void CameraService::SensorPrivacyPolicy::unregisterSelf() { Mutex::Autolock _l(mSensorPrivacyLock); SensorPrivacyManager spm; spm.removeSensorPrivacyListener(this); spm.unlinkToDeath(this); mSpm.removeSensorPrivacyListener(this); mSpm.unlinkToDeath(this); mRegistered = false; ALOGV("SensorPrivacyPolicy: Unregistered with SensorPrivacyManager"); } Loading services/camera/libcameraservice/CameraService.h +2 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ #include <binder/IAppOpsCallback.h> #include <binder/IUidObserver.h> #include <hardware/camera.h> #include <sensorprivacy/SensorPrivacyManager.h> #include <android/hardware/camera/common/1.0/types.h> Loading Loading @@ -656,6 +657,7 @@ private: virtual void binderDied(const wp<IBinder> &who); private: SensorPrivacyManager mSpm; wp<CameraService> mService; Mutex mSensorPrivacyLock; bool mSensorPrivacyEnabled; Loading Loading
services/camera/libcameraservice/CameraService.cpp +5 −8 Original line number Diff line number Diff line Loading @@ -56,7 +56,6 @@ #include <media/IMediaHTTPService.h> #include <media/mediaplayer.h> #include <mediautils/BatteryNotifier.h> #include <sensorprivacy/SensorPrivacyManager.h> #include <utils/Errors.h> #include <utils/Log.h> #include <utils/String16.h> Loading Loading @@ -3258,10 +3257,9 @@ void CameraService::SensorPrivacyPolicy::registerSelf() { if (mRegistered) { return; } SensorPrivacyManager spm; spm.addSensorPrivacyListener(this); mSensorPrivacyEnabled = spm.isSensorPrivacyEnabled(); status_t res = spm.linkToDeath(this); mSpm.addSensorPrivacyListener(this); mSensorPrivacyEnabled = mSpm.isSensorPrivacyEnabled(); status_t res = mSpm.linkToDeath(this); if (res == OK) { mRegistered = true; ALOGV("SensorPrivacyPolicy: Registered with SensorPrivacyManager"); Loading @@ -3270,9 +3268,8 @@ void CameraService::SensorPrivacyPolicy::registerSelf() { void CameraService::SensorPrivacyPolicy::unregisterSelf() { Mutex::Autolock _l(mSensorPrivacyLock); SensorPrivacyManager spm; spm.removeSensorPrivacyListener(this); spm.unlinkToDeath(this); mSpm.removeSensorPrivacyListener(this); mSpm.unlinkToDeath(this); mRegistered = false; ALOGV("SensorPrivacyPolicy: Unregistered with SensorPrivacyManager"); } Loading
services/camera/libcameraservice/CameraService.h +2 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ #include <binder/IAppOpsCallback.h> #include <binder/IUidObserver.h> #include <hardware/camera.h> #include <sensorprivacy/SensorPrivacyManager.h> #include <android/hardware/camera/common/1.0/types.h> Loading Loading @@ -656,6 +657,7 @@ private: virtual void binderDied(const wp<IBinder> &who); private: SensorPrivacyManager mSpm; wp<CameraService> mService; Mutex mSensorPrivacyLock; bool mSensorPrivacyEnabled; Loading