diff options
author | Ziyan <jaraidaniel@gmail.com> | 2015-11-06 19:59:03 +0100 |
---|---|---|
committer | Ziyan <jaraidaniel@gmail.com> | 2016-01-17 22:46:57 +0100 |
commit | 22f5a971e82bc1dc229f34ffa93be9fe0dec9053 (patch) | |
tree | 024a9a85b89248928c3824c9d0ae12f4d86aebe8 /camera | |
parent | 1a8bffe6a84bb959ce1b7e9f71f065d032198f5e (diff) | |
download | device_samsung_tuna-22f5a971e82bc1dc229f34ffa93be9fe0dec9053.zip device_samsung_tuna-22f5a971e82bc1dc229f34ffa93be9fe0dec9053.tar.gz device_samsung_tuna-22f5a971e82bc1dc229f34ffa93be9fe0dec9053.tar.bz2 |
camera: fix build for recent 6.0 releases
Frameworks/native commit e2806cb4456e3815e979f333ed23ec7df591a9ff made
SensorManager(const android::String16&) private.
Let's use SensorManager& getInstanceForPackage(const String16& packageName)
instead.
Diffstat (limited to 'camera')
-rw-r--r-- | camera/SensorListener.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/camera/SensorListener.cpp b/camera/SensorListener.cpp index 3f288fd..dde4481 100644 --- a/camera/SensorListener.cpp +++ b/camera/SensorListener.cpp @@ -131,7 +131,7 @@ SensorListener::~SensorListener() { status_t SensorListener::initialize() { status_t ret = NO_ERROR; #ifdef ANDROID_API_MM_OR_LATER - android::SensorManager mgr(android::String16("TI OMAP CameraHal Module")); + android::SensorManager& mgr(android::SensorManager::getInstanceForPackage(android::String16("TI OMAP CameraHal Module"))); #else android::SensorManager& mgr(android::SensorManager::getInstance()); #endif @@ -198,7 +198,7 @@ void SensorListener::handleOrientation(uint32_t orientation, uint32_t tilt) { void SensorListener::enableSensor(sensor_type_t type) { android::Sensor const* sensor; #ifdef ANDROID_API_MM_OR_LATER - android::SensorManager mgr(android::String16("TI OMAP CameraHal Module")); + android::SensorManager& mgr(android::SensorManager::getInstanceForPackage(android::String16("TI OMAP CameraHal Module"))); #else android::SensorManager& mgr(android::SensorManager::getInstance()); #endif @@ -225,7 +225,7 @@ void SensorListener::enableSensor(sensor_type_t type) { void SensorListener::disableSensor(sensor_type_t type) { android::Sensor const* sensor; #ifdef ANDROID_API_MM_OR_LATER - android::SensorManager mgr(android::String16("TI OMAP CameraHal Module")); + android::SensorManager& mgr(android::SensorManager::getInstanceForPackage(android::String16("TI OMAP CameraHal Module"))); #else android::SensorManager& mgr(android::SensorManager::getInstance()); #endif |