Loading src/com/android/bluetooth/gatt/GattService.java +9 −1 Original line number Original line Diff line number Diff line Loading @@ -654,8 +654,16 @@ public class GattService extends ProfileService { void onSearchCompleted(int connId, int status) throws RemoteException { void onSearchCompleted(int connId, int status) throws RemoteException { if (DBG) Log.d(TAG, "onSearchCompleted() - connId=" + connId+ ", status=" + status); if (DBG) Log.d(TAG, "onSearchCompleted() - connId=" + connId+ ", status=" + status); // Gatt DB is ready! // Gatt DB is ready! // This callback was called from the jni_workqueue thread. If we make request to the stack // on the same thread, it might cause deadlock. Schedule request on a new thread instead. Thread t = new Thread(new Runnable() { public void run() { gattClientGetGattDbNative(connId); gattClientGetGattDbNative(connId); } } }); t.start(); } GattDbElement GetSampleGattDbElement() { GattDbElement GetSampleGattDbElement() { return new GattDbElement(); return new GattDbElement(); Loading Loading
src/com/android/bluetooth/gatt/GattService.java +9 −1 Original line number Original line Diff line number Diff line Loading @@ -654,8 +654,16 @@ public class GattService extends ProfileService { void onSearchCompleted(int connId, int status) throws RemoteException { void onSearchCompleted(int connId, int status) throws RemoteException { if (DBG) Log.d(TAG, "onSearchCompleted() - connId=" + connId+ ", status=" + status); if (DBG) Log.d(TAG, "onSearchCompleted() - connId=" + connId+ ", status=" + status); // Gatt DB is ready! // Gatt DB is ready! // This callback was called from the jni_workqueue thread. If we make request to the stack // on the same thread, it might cause deadlock. Schedule request on a new thread instead. Thread t = new Thread(new Runnable() { public void run() { gattClientGetGattDbNative(connId); gattClientGetGattDbNative(connId); } } }); t.start(); } GattDbElement GetSampleGattDbElement() { GattDbElement GetSampleGattDbElement() { return new GattDbElement(); return new GattDbElement(); Loading