summaryrefslogtreecommitdiff
path: root/framework/java/android/bluetooth/le/PeriodicAdvertisingManager.java
diff options
context:
space:
mode:
Diffstat (limited to 'framework/java/android/bluetooth/le/PeriodicAdvertisingManager.java')
-rw-r--r--framework/java/android/bluetooth/le/PeriodicAdvertisingManager.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/framework/java/android/bluetooth/le/PeriodicAdvertisingManager.java b/framework/java/android/bluetooth/le/PeriodicAdvertisingManager.java
index 7711a00740..13b7163f30 100644
--- a/framework/java/android/bluetooth/le/PeriodicAdvertisingManager.java
+++ b/framework/java/android/bluetooth/le/PeriodicAdvertisingManager.java
@@ -177,7 +177,7 @@ public final class PeriodicAdvertisingManager {
mCallbackWrappers.put(callback, wrapped);
try {
- final SynchronousResultReceiver recv = SynchronousResultReceiver.get();
+ final SynchronousResultReceiver recv = new SynchronousResultReceiver();
gatt.registerSync(scanResult, skip, timeout, wrapped, mAttributionSource, recv);
recv.awaitResultNoInterrupt(getSyncTimeout()).getValue(null);
} catch (TimeoutException | RemoteException e) {
@@ -215,7 +215,7 @@ public final class PeriodicAdvertisingManager {
}
try {
- final SynchronousResultReceiver recv = SynchronousResultReceiver.get();
+ final SynchronousResultReceiver recv = new SynchronousResultReceiver();
gatt.unregisterSync(wrapper, mAttributionSource, recv);
recv.awaitResultNoInterrupt(getSyncTimeout()).getValue(null);
} catch (TimeoutException | RemoteException e) {
@@ -246,7 +246,7 @@ public final class PeriodicAdvertisingManager {
return;
}
try {
- final SynchronousResultReceiver recv = SynchronousResultReceiver.get();
+ final SynchronousResultReceiver recv = new SynchronousResultReceiver();
gatt.transferSync(bda, serviceData , syncHandle, mAttributionSource, recv);
recv.awaitResultNoInterrupt(getSyncTimeout()).getValue(null);
} catch (TimeoutException | RemoteException e) {
@@ -291,7 +291,7 @@ public final class PeriodicAdvertisingManager {
throw new IllegalArgumentException("callback was not properly registered");
}
try {
- final SynchronousResultReceiver recv = SynchronousResultReceiver.get();
+ final SynchronousResultReceiver recv = new SynchronousResultReceiver();
gatt.transferSetInfo(bda, serviceData , advHandle, wrapper, mAttributionSource, recv);
recv.awaitResultNoInterrupt(getSyncTimeout()).getValue(null);
} catch (RemoteException | TimeoutException e) {