diff options
author | Ziyan <jaraidaniel@gmail.com> | 2015-11-06 19:59:03 +0100 |
---|---|---|
committer | Michael Gernoth <michael@gernoth.net> | 2015-11-07 14:44:34 +0100 |
commit | 1905f15c8ecfdab8e053a684aa9093e66421cd58 (patch) | |
tree | 4b88ea39b61aed636d805da611e77d6d28a37196 | |
parent | 5e398ba40879f6e3870d2e497ebb2b52514aa28e (diff) | |
download | hardware_ti_omap4-1905f15c8ecfdab8e053a684aa9093e66421cd58.zip hardware_ti_omap4-1905f15c8ecfdab8e053a684aa9093e66421cd58.tar.gz hardware_ti_omap4-1905f15c8ecfdab8e053a684aa9093e66421cd58.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.
Change-Id: I15a582a7a6919c341958188da0c9168045de57e7
-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 |