CameraService: hold onto SensorPrivacyManager
unlinkToDeath is no longer required, (this change in behavior is to
avoid leaks) so holding onto the service here (still calling
unlinkToDeath to avoid a log, but may for instance remove all
unlinkToDeath calls in the future).
Bug: 145692765
Test: boot, see linkToDeath maintained
Change-Id: Ib74ab470580643ff61fc684fdd4e16d5e38389af
diff --git a/services/camera/libcameraservice/CameraService.h b/services/camera/libcameraservice/CameraService.h
index 8bb78cd..1283148 100644
--- a/services/camera/libcameraservice/CameraService.h
+++ b/services/camera/libcameraservice/CameraService.h
@@ -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>
@@ -599,6 +600,7 @@
virtual void binderDied(const wp<IBinder> &who);
private:
+ SensorPrivacyManager mSpm;
wp<CameraService> mService;
Mutex mSensorPrivacyLock;
bool mSensorPrivacyEnabled;