diff options
author | Kiran Kelageri <kirankelageri@codeaurora.org> | 2015-08-04 15:22:36 -0700 |
---|---|---|
committer | Linux Build Service Account <lnxbuild@localhost> | 2015-10-06 03:25:40 -0600 |
commit | 6d58ab27c66e1343f11118fc0f371a582cfe21f8 (patch) | |
tree | d445553a50a7646be4885bf3b8c4e7cbf5a4e6d3 /jni | |
parent | 48723f88131eae7ed8f9d9465cd45651558059ce (diff) | |
download | android_packages_apps_Bluetooth-6d58ab27c66e1343f11118fc0f371a582cfe21f8.tar.gz android_packages_apps_Bluetooth-6d58ab27c66e1343f11118fc0f371a582cfe21f8.tar.bz2 android_packages_apps_Bluetooth-6d58ab27c66e1343f11118fc0f371a582cfe21f8.zip |
Bluetooth: Enable SSR.
Enabling SSR feature.
Change-Id: I142de8bab73108cefd00d6389eddf6eece7c0c58
Diffstat (limited to 'jni')
-rw-r--r--[-rwxr-xr-x] | jni/com_android_bluetooth_btservice_AdapterService.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/jni/com_android_bluetooth_btservice_AdapterService.cpp b/jni/com_android_bluetooth_btservice_AdapterService.cpp index 931c73e94..79bd73c35 100755..100644 --- a/jni/com_android_bluetooth_btservice_AdapterService.cpp +++ b/jni/com_android_bluetooth_btservice_AdapterService.cpp @@ -743,6 +743,28 @@ static bool cleanupNative(JNIEnv *env, jobject obj) { return JNI_TRUE; } +static bool ssrcleanupNative(JNIEnv *env, jobject obj, jboolean cleanup) { + ALOGV("%s:",__FUNCTION__); + + jboolean result = JNI_FALSE; + if (!sBluetoothInterface) return result; + + sBluetoothInterface->ssrcleanup(); + ALOGI("%s: return from cleanup",__FUNCTION__); + if (cleanup == JNI_TRUE) { + ALOGI("%s: SSR Cleanup - DISABLE Timeout ",__FUNCTION__); + if (sJniCallbacksObj) { + env->DeleteGlobalRef(sJniCallbacksObj); + sJniCallbacksObj = NULL; + } + if (sJniAdapterServiceObj) { + env->DeleteGlobalRef(sJniAdapterServiceObj); + sJniAdapterServiceObj = NULL; + } + } + return JNI_TRUE; +} + static jboolean enableNative(JNIEnv* env, jobject obj) { ALOGV("%s:",__FUNCTION__); @@ -1237,6 +1259,7 @@ static JNINativeMethod sMethods[] = { {"classInitNative", "()V", (void *) classInitNative}, {"initNative", "()Z", (void *) initNative}, {"cleanupNative", "()V", (void*) cleanupNative}, + {"ssrcleanupNative", "(Z)V", (void*) ssrcleanupNative}, {"enableNative", "()Z", (void*) enableNative}, {"disableNative", "()Z", (void*) disableNative}, {"setAdapterPropertyNative", "(I[B)Z", (void*) setAdapterPropertyNative}, |