Loading android/app/jni/com_android_bluetooth_gatt.cpp +8 −8 Original line number Diff line number Diff line Loading @@ -1136,11 +1136,11 @@ static int gattClientGetDeviceTypeNative(JNIEnv* env, jobject object, } static void gattClientRegisterAppNative(JNIEnv* env, jobject object, jlong app_uuid_lsb, jlong app_uuid_msb) { jlong app_uuid_lsb, jlong app_uuid_msb, jboolean eatt_support) { if (!sGattIf) return; Uuid uuid = from_java_uuid(app_uuid_msb, app_uuid_lsb); sGattIf->client->register_client(uuid); sGattIf->client->register_client(uuid, eatt_support); } static void gattClientUnregisterAppNative(JNIEnv* env, jobject object, Loading Loading @@ -1657,11 +1657,11 @@ static void gattClientReadScanReportsNative(JNIEnv* env, jobject object, * Native server functions */ static void gattServerRegisterAppNative(JNIEnv* env, jobject object, jlong app_uuid_lsb, jlong app_uuid_msb) { jlong app_uuid_lsb, jlong app_uuid_msb, jboolean eatt_support) { if (!sGattIf) return; Uuid uuid = from_java_uuid(app_uuid_msb, app_uuid_lsb); sGattIf->server->register_server(uuid); sGattIf->server->register_server(uuid, eatt_support); } static void gattServerUnregisterAppNative(JNIEnv* env, jobject object, Loading Loading @@ -2334,7 +2334,7 @@ static JNINativeMethod sMethods[] = { {"cleanupNative", "()V", (void*)cleanupNative}, {"gattClientGetDeviceTypeNative", "(Ljava/lang/String;)I", (void*)gattClientGetDeviceTypeNative}, {"gattClientRegisterAppNative", "(JJ)V", {"gattClientRegisterAppNative", "(JJZ)V", (void*)gattClientRegisterAppNative}, {"gattClientUnregisterAppNative", "(I)V", (void*)gattClientUnregisterAppNative}, Loading Loading @@ -2373,7 +2373,7 @@ static JNINativeMethod sMethods[] = { (void*)gattClientConfigureMTUNative}, {"gattConnectionParameterUpdateNative", "(ILjava/lang/String;IIIIII)V", (void*)gattConnectionParameterUpdateNative}, {"gattServerRegisterAppNative", "(JJ)V", {"gattServerRegisterAppNative", "(JJZ)V", (void*)gattServerRegisterAppNative}, {"gattServerUnregisterAppNative", "(I)V", (void*)gattServerUnregisterAppNative}, Loading android/app/src/com/android/bluetooth/gatt/GattService.java +11 −10 Original line number Diff line number Diff line Loading @@ -442,12 +442,12 @@ public class GattService extends ProfileService { } @Override public void registerClient(ParcelUuid uuid, IBluetoothGattCallback callback) { public void registerClient(ParcelUuid uuid, IBluetoothGattCallback callback, boolean eatt_support) { GattService service = getService(); if (service == null) { return; } service.registerClient(uuid.getUuid(), callback); service.registerClient(uuid.getUuid(), callback, eatt_support); } @Override Loading Loading @@ -715,12 +715,13 @@ public class GattService extends ProfileService { } @Override public void registerServer(ParcelUuid uuid, IBluetoothGattServerCallback callback) { public void registerServer(ParcelUuid uuid, IBluetoothGattServerCallback callback, boolean eatt_support) { GattService service = getService(); if (service == null) { return; } service.registerServer(uuid.getUuid(), callback); service.registerServer(uuid.getUuid(), callback, eatt_support); } @Override Loading Loading @@ -2319,14 +2320,14 @@ public class GattService extends ProfileService { * GATT Service functions - CLIENT *************************************************************************/ void registerClient(UUID uuid, IBluetoothGattCallback callback) { void registerClient(UUID uuid, IBluetoothGattCallback callback, boolean eatt_support) { enforceCallingOrSelfPermission(BLUETOOTH_PERM, "Need BLUETOOTH permission"); if (DBG) { Log.d(TAG, "registerClient() - UUID=" + uuid); } mClientMap.add(uuid, null, callback, null, this); gattClientRegisterAppNative(uuid.getLeastSignificantBits(), uuid.getMostSignificantBits()); gattClientRegisterAppNative(uuid.getLeastSignificantBits(), uuid.getMostSignificantBits(), eatt_support); } void unregisterClient(int clientIf) { Loading Loading @@ -2984,14 +2985,14 @@ public class GattService extends ProfileService { * GATT Service functions - SERVER *************************************************************************/ void registerServer(UUID uuid, IBluetoothGattServerCallback callback) { void registerServer(UUID uuid, IBluetoothGattServerCallback callback, boolean eatt_support) { enforceCallingOrSelfPermission(BLUETOOTH_PERM, "Need BLUETOOTH permission"); if (DBG) { Log.d(TAG, "registerServer() - UUID=" + uuid); } mServerMap.add(uuid, null, callback, null, this); gattServerRegisterAppNative(uuid.getLeastSignificantBits(), uuid.getMostSignificantBits()); gattServerRegisterAppNative(uuid.getLeastSignificantBits(), uuid.getMostSignificantBits(), eatt_support); } void unregisterServer(int serverIf) { Loading Loading @@ -3403,7 +3404,7 @@ public class GattService extends ProfileService { private native int gattClientGetDeviceTypeNative(String address); private native void gattClientRegisterAppNative(long appUuidLsb, long appUuidMsb); private native void gattClientRegisterAppNative(long appUuidLsb, long appUuidMsb, boolean eatt_support); private native void gattClientUnregisterAppNative(int clientIf); Loading Loading @@ -3453,7 +3454,7 @@ public class GattService extends ProfileService { int minInterval, int maxInterval, int latency, int timeout, int minConnectionEventLen, int maxConnectionEventLen); private native void gattServerRegisterAppNative(long appUuidLsb, long appUuidMsb); private native void gattServerRegisterAppNative(long appUuidLsb, long appUuidMsb, boolean eatt_support); private native void gattServerUnregisterAppNative(int serverIf); Loading Loading
android/app/jni/com_android_bluetooth_gatt.cpp +8 −8 Original line number Diff line number Diff line Loading @@ -1136,11 +1136,11 @@ static int gattClientGetDeviceTypeNative(JNIEnv* env, jobject object, } static void gattClientRegisterAppNative(JNIEnv* env, jobject object, jlong app_uuid_lsb, jlong app_uuid_msb) { jlong app_uuid_lsb, jlong app_uuid_msb, jboolean eatt_support) { if (!sGattIf) return; Uuid uuid = from_java_uuid(app_uuid_msb, app_uuid_lsb); sGattIf->client->register_client(uuid); sGattIf->client->register_client(uuid, eatt_support); } static void gattClientUnregisterAppNative(JNIEnv* env, jobject object, Loading Loading @@ -1657,11 +1657,11 @@ static void gattClientReadScanReportsNative(JNIEnv* env, jobject object, * Native server functions */ static void gattServerRegisterAppNative(JNIEnv* env, jobject object, jlong app_uuid_lsb, jlong app_uuid_msb) { jlong app_uuid_lsb, jlong app_uuid_msb, jboolean eatt_support) { if (!sGattIf) return; Uuid uuid = from_java_uuid(app_uuid_msb, app_uuid_lsb); sGattIf->server->register_server(uuid); sGattIf->server->register_server(uuid, eatt_support); } static void gattServerUnregisterAppNative(JNIEnv* env, jobject object, Loading Loading @@ -2334,7 +2334,7 @@ static JNINativeMethod sMethods[] = { {"cleanupNative", "()V", (void*)cleanupNative}, {"gattClientGetDeviceTypeNative", "(Ljava/lang/String;)I", (void*)gattClientGetDeviceTypeNative}, {"gattClientRegisterAppNative", "(JJ)V", {"gattClientRegisterAppNative", "(JJZ)V", (void*)gattClientRegisterAppNative}, {"gattClientUnregisterAppNative", "(I)V", (void*)gattClientUnregisterAppNative}, Loading Loading @@ -2373,7 +2373,7 @@ static JNINativeMethod sMethods[] = { (void*)gattClientConfigureMTUNative}, {"gattConnectionParameterUpdateNative", "(ILjava/lang/String;IIIIII)V", (void*)gattConnectionParameterUpdateNative}, {"gattServerRegisterAppNative", "(JJ)V", {"gattServerRegisterAppNative", "(JJZ)V", (void*)gattServerRegisterAppNative}, {"gattServerUnregisterAppNative", "(I)V", (void*)gattServerUnregisterAppNative}, Loading
android/app/src/com/android/bluetooth/gatt/GattService.java +11 −10 Original line number Diff line number Diff line Loading @@ -442,12 +442,12 @@ public class GattService extends ProfileService { } @Override public void registerClient(ParcelUuid uuid, IBluetoothGattCallback callback) { public void registerClient(ParcelUuid uuid, IBluetoothGattCallback callback, boolean eatt_support) { GattService service = getService(); if (service == null) { return; } service.registerClient(uuid.getUuid(), callback); service.registerClient(uuid.getUuid(), callback, eatt_support); } @Override Loading Loading @@ -715,12 +715,13 @@ public class GattService extends ProfileService { } @Override public void registerServer(ParcelUuid uuid, IBluetoothGattServerCallback callback) { public void registerServer(ParcelUuid uuid, IBluetoothGattServerCallback callback, boolean eatt_support) { GattService service = getService(); if (service == null) { return; } service.registerServer(uuid.getUuid(), callback); service.registerServer(uuid.getUuid(), callback, eatt_support); } @Override Loading Loading @@ -2319,14 +2320,14 @@ public class GattService extends ProfileService { * GATT Service functions - CLIENT *************************************************************************/ void registerClient(UUID uuid, IBluetoothGattCallback callback) { void registerClient(UUID uuid, IBluetoothGattCallback callback, boolean eatt_support) { enforceCallingOrSelfPermission(BLUETOOTH_PERM, "Need BLUETOOTH permission"); if (DBG) { Log.d(TAG, "registerClient() - UUID=" + uuid); } mClientMap.add(uuid, null, callback, null, this); gattClientRegisterAppNative(uuid.getLeastSignificantBits(), uuid.getMostSignificantBits()); gattClientRegisterAppNative(uuid.getLeastSignificantBits(), uuid.getMostSignificantBits(), eatt_support); } void unregisterClient(int clientIf) { Loading Loading @@ -2984,14 +2985,14 @@ public class GattService extends ProfileService { * GATT Service functions - SERVER *************************************************************************/ void registerServer(UUID uuid, IBluetoothGattServerCallback callback) { void registerServer(UUID uuid, IBluetoothGattServerCallback callback, boolean eatt_support) { enforceCallingOrSelfPermission(BLUETOOTH_PERM, "Need BLUETOOTH permission"); if (DBG) { Log.d(TAG, "registerServer() - UUID=" + uuid); } mServerMap.add(uuid, null, callback, null, this); gattServerRegisterAppNative(uuid.getLeastSignificantBits(), uuid.getMostSignificantBits()); gattServerRegisterAppNative(uuid.getLeastSignificantBits(), uuid.getMostSignificantBits(), eatt_support); } void unregisterServer(int serverIf) { Loading Loading @@ -3403,7 +3404,7 @@ public class GattService extends ProfileService { private native int gattClientGetDeviceTypeNative(String address); private native void gattClientRegisterAppNative(long appUuidLsb, long appUuidMsb); private native void gattClientRegisterAppNative(long appUuidLsb, long appUuidMsb, boolean eatt_support); private native void gattClientUnregisterAppNative(int clientIf); Loading Loading @@ -3453,7 +3454,7 @@ public class GattService extends ProfileService { int minInterval, int maxInterval, int latency, int timeout, int minConnectionEventLen, int maxConnectionEventLen); private native void gattServerRegisterAppNative(long appUuidLsb, long appUuidMsb); private native void gattServerRegisterAppNative(long appUuidLsb, long appUuidMsb, boolean eatt_support); private native void gattServerUnregisterAppNative(int serverIf); Loading