diff options
author | Aravind Akella <aakella@google.com> | 2015-07-24 17:35:31 -0700 |
---|---|---|
committer | Aravind Akella <aakella@google.com> | 2015-07-27 14:19:31 -0700 |
commit | 5967ddbf05f146bdb6744207e3daed1aa76fc637 (patch) | |
tree | f057920df521b0ba3a9597187c4bd48282ea67b3 /core/jni | |
parent | 8924f23d3ecdcb2b1ce4dbc9bb4fbb9ddfa62710 (diff) | |
download | frameworks_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.cpp | 2 |
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 |