diff options
author | Wei Wang <weiwa@google.com> | 2014-07-22 12:01:40 -0700 |
---|---|---|
committer | Wei Wang <weiwa@google.com> | 2014-07-22 12:17:41 -0700 |
commit | 9c24a0ef159f3332a2e66648d8d3c7dfac26cbc8 (patch) | |
tree | 8a29465d7ee2f75baace19596cb2852261180640 /jni | |
parent | d8a747e0e92700d336d326ed778c59a1783eded0 (diff) | |
download | android_packages_apps_Bluetooth-9c24a0ef159f3332a2e66648d8d3c7dfac26cbc8.tar.gz android_packages_apps_Bluetooth-9c24a0ef159f3332a2e66648d8d3c7dfac26cbc8.tar.bz2 android_packages_apps_Bluetooth-9c24a0ef159f3332a2e66648d8d3c7dfac26cbc8.zip |
Add a ScanManager that handles Scan related operations. Remove
GattServiceStateMachine.
Change-Id: I03afefaa4ba534abbf8e2bd38b4888020764cb22
Diffstat (limited to 'jni')
-rw-r--r-- | jni/com_android_bluetooth_gatt.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/jni/com_android_bluetooth_gatt.cpp b/jni/com_android_bluetooth_gatt.cpp index 57fad29dc..d80372cee 100644 --- a/jni/com_android_bluetooth_gatt.cpp +++ b/jni/com_android_bluetooth_gatt.cpp @@ -1717,12 +1717,15 @@ static JNINativeMethod sAdvertiseMethods[] = { {"gattClientDisableAdvNative", "(I)V", (void *) gattClientDisableAdvNative}, }; -// JNI functions defined in GattStateMachine class. -static JNINativeMethod sStateMachineMethods[] = { +// JNI functions defined in ScanManager class. +static JNINativeMethod sScanMethods[] = { {"gattClientScanNative", "(Z)V", (void *) gattClientScanNative}, + // Batch scan JNI functions. {"gattClientConfigBatchScanStorageNative", "(IIII)V",(void *) gattClientConfigBatchScanStorageNative}, {"gattClientStartBatchScanNative", "(IIIIII)V", (void *) gattClientStartBatchScanNative}, {"gattClientStopBatchScanNative", "(I)V", (void *) gattClientStopBatchScanNative}, + {"gattClientReadScanReportsNative", "(II)V", (void *) gattClientReadScanReportsNative}, + // Scan filter JNI functions. {"gattClientScanFilterParamAddNative", "(IIIIIIIIIII)V", (void *) gattClientScanFilterParamAddNative}, {"gattClientScanFilterParamDeleteNative", "(II)V", (void *) gattClientScanFilterParamDeleteNative}, {"gattClientScanFilterParamClearAllNative", "(I)V", (void *) gattClientScanFilterParamClearAllNative}, @@ -1774,15 +1777,14 @@ static JNINativeMethod sMethods[] = { {"gattSetAdvDataNative", "(IZZZIII[B[B[B)V", (void *) gattSetAdvDataNative}, {"gattSetScanParametersNative", "(II)V", (void *) gattSetScanParametersNative}, - {"gattClientReadScanReportsNative", "(II)V", (void *) gattClientReadScanReportsNative}, {"gattTestNative", "(IJJLjava/lang/String;IIIII)V", (void *) gattTestNative}, }; int register_com_android_bluetooth_gatt(JNIEnv* env) { int register_success = - jniRegisterNativeMethods(env, "com/android/bluetooth/gatt/GattServiceStateMachine", - sStateMachineMethods, NELEM(sStateMachineMethods)); + jniRegisterNativeMethods(env, "com/android/bluetooth/gatt/ScanManager$ScanNative", + sScanMethods, NELEM(sScanMethods)); register_success &= jniRegisterNativeMethods(env, "com/android/bluetooth/gatt/AdvertiseManager$AdvertiseNative", sAdvertiseMethods, NELEM(sAdvertiseMethods)); |