summaryrefslogtreecommitdiffstats
path: root/core/jni
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 /core/jni
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 'core/jni')
-rw-r--r--core/jni/android_hardware_SensorManager.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/jni/android_hardware_SensorManager.cpp b/core/jni/android_hardware_SensorManager.cpp
index ec56507..7d0afdc 100644
--- a/core/jni/android_hardware_SensorManager.cpp
+++ b/core/jni/android_hardware_SensorManager.cpp
@@ -138,7 +138,7 @@ nativeCreate
(JNIEnv *env, jclass clazz, jstring opPackageName)
{
ScopedUtfChars opPackageNameUtf(env, opPackageName);
- return (jlong) new SensorManager(String16(opPackageNameUtf.c_str()));
+ return (jlong) &SensorManager::getInstanceForPackage(String16(opPackageNameUtf.c_str()));
}
static jboolean