diff options
author | Aravind Akella <aakella@google.com> | 2015-06-29 12:35:51 -0700 |
---|---|---|
committer | Aravind Akella <aakella@google.com> | 2015-06-29 13:04:09 -0700 |
commit | d123b51f8b14047804612cb1b15288cca81ed4f9 (patch) | |
tree | c0c1a2b22d5821ef3f040c221724d69f64db01d3 /core/jni | |
parent | a1b647c8833cf85e304e3c201e7d0477b9838502 (diff) | |
download | frameworks_base-d123b51f8b14047804612cb1b15288cca81ed4f9.zip frameworks_base-d123b51f8b14047804612cb1b15288cca81ed4f9.tar.gz frameworks_base-d123b51f8b14047804612cb1b15288cca81ed4f9.tar.bz2 |
Changes to Data Injection mode APIs
Change-Id: Id55eaf03656d2d55df7f38d4cac643d97354fe9b
Diffstat (limited to 'core/jni')
-rw-r--r-- | core/jni/android_hardware_SensorManager.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/core/jni/android_hardware_SensorManager.cpp b/core/jni/android_hardware_SensorManager.cpp index c9d609c..1356c99 100644 --- a/core/jni/android_hardware_SensorManager.cpp +++ b/core/jni/android_hardware_SensorManager.cpp @@ -130,7 +130,6 @@ getInternedString(JNIEnv *env, const String8* string) { internedStrings.insert(std::make_pair(string, internedString)); env->DeleteLocalRef(localString); } - return internedString; } @@ -182,10 +181,9 @@ nativeGetNextSensor(JNIEnv *env, jclass clazz, jlong sensorManager, jobject sens return size_t(next) < count ? next : 0; } -static int nativeEnableDataInjection(JNIEnv *_env, jclass _this, jlong sensorManager, - jboolean enable) { +static jboolean nativeIsDataInjectionEnabled(JNIEnv *_env, jclass _this, jlong sensorManager) { SensorManager* mgr = reinterpret_cast<SensorManager*>(sensorManager); - return mgr->enableDataInjection(enable); + return mgr->isDataInjectionEnabled(); } //---------------------------------------------------------------------------- @@ -358,9 +356,9 @@ static JNINativeMethod gSystemSensorManagerMethods[] = { "(JLandroid/hardware/Sensor;I)I", (void*)nativeGetNextSensor }, - {"nativeEnableDataInjection", - "(JZ)I", - (void*)nativeEnableDataInjection }, + {"nativeIsDataInjectionEnabled", + "(J)Z", + (void*)nativeIsDataInjectionEnabled}, }; static JNINativeMethod gBaseEventQueueMethods[] = { |