summaryrefslogtreecommitdiffstats
path: root/native
diff options
context:
space:
mode:
authorAravind Akella <aakella@google.com>2015-07-24 17:35:31 -0700
committerAravind Akella <aakella@google.com>2015-07-27 14:19:31 -0700
commit5967ddbf05f146bdb6744207e3daed1aa76fc637 (patch)
treef057920df521b0ba3a9597187c4bd48282ea67b3 /native
parent8924f23d3ecdcb2b1ce4dbc9bb4fbb9ddfa62710 (diff)
downloadframeworks_base-5967ddbf05f146bdb6744207e3daed1aa76fc637.zip
frameworks_base-5967ddbf05f146bdb6744207e3daed1aa76fc637.tar.gz
frameworks_base-5967ddbf05f146bdb6744207e3daed1aa76fc637.tar.bz2
Call getInstanceForPackage instead of creating a new SensorManager instance.
Bug: 22529981 Change-Id: Id3adfbcf55d1268db1a555c72a06456a5219c086
Diffstat (limited to 'native')
-rw-r--r--native/android/sensor.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/native/android/sensor.cpp b/native/android/sensor.cpp
index 26b41e8..ca49476 100644
--- a/native/android/sensor.cpp
+++ b/native/android/sensor.cpp
@@ -39,9 +39,6 @@ using android::String16;
/*****************************************************************************/
-android::Mutex android::SensorManager::sLock;
-std::map<String16, SensorManager*> android::SensorManager::sPackageInstances;
-
ASensorManager* ASensorManager_getInstance()
{
return ASensorManager_getInstanceForPackage(NULL);
@@ -206,4 +203,4 @@ int ASensor_getReportingMode(ASensor const* sensor)
bool ASensor_isWakeUpSensor(ASensor const* sensor)
{
return static_cast<Sensor const*>(sensor)->isWakeUpSensor();
-} \ No newline at end of file
+}