Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 49700107 authored by Jack He's avatar Jack He Committed by Kyunglyul Hyun
Browse files

GATT: Split native interface from GattService

This prepares GattService for mock based unit testing

Bug: 235781579
Test: atest BluetoothInstrumentationTests, flash and connect to BLE
devices
Tag: #stability

Change-Id: I2e9f0fabf8b7505ab83d42c0513fc6d675e15b03
parent 2d4560b7
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -2443,7 +2443,7 @@ static JNINativeMethod sScanMethods[] = {
     (void*)gattSetScanParametersNative},
};

// JNI functions defined in GattService class.
// JNI functions defined in GattNativeInterface class.
static JNINativeMethod sMethods[] = {
    {"classInitNative", "()V", (void*)classInitNative},
    {"initializeNative", "()V", (void*)initializeNative},
@@ -2528,7 +2528,8 @@ int register_com_android_bluetooth_gatt(JNIEnv* env) {
      env, "com/android/bluetooth/gatt/PeriodicScanManager",
      sPeriodicScanMethods, NELEM(sPeriodicScanMethods));
  return register_success &
         jniRegisterNativeMethods(env, "com/android/bluetooth/gatt/GattService",
                                  sMethods, NELEM(sMethods));
         jniRegisterNativeMethods(
             env, "com/android/bluetooth/gatt/GattNativeInterface", sMethods,
             NELEM(sMethods));
}
}  // namespace android