diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2022-08-10 11:15:16 -0700 |
---|---|---|
committer | Linux Build Service Account <lnxbuild@localhost> | 2022-08-10 11:15:16 -0700 |
commit | fd44afebdcad9cfcaf4b29e979f1d6acc6c917f2 (patch) | |
tree | 05fcdd928bf675083b34ec65486e95226d9a2054 /framework/java/android/bluetooth/le/PeriodicAdvertisingManager.java | |
parent | 7b2835c88cb8d1733d60d7a558d80d9fc0d05150 (diff) | |
parent | 7c361396d2c2fbf58423d45d5c54792a69bade75 (diff) |
Merge 7c361396d2c2fbf58423d45d5c54792a69bade75 on remote branch
Change-Id: Ib46c197d57679181b505738ad576adf0779e68a0
Diffstat (limited to 'framework/java/android/bluetooth/le/PeriodicAdvertisingManager.java')
-rw-r--r-- | framework/java/android/bluetooth/le/PeriodicAdvertisingManager.java | 8 |
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 e8e1d8737b..730c64f91f 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 = new SynchronousResultReceiver(); + final SynchronousResultReceiver recv = SynchronousResultReceiver.get(); 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 = new SynchronousResultReceiver(); + final SynchronousResultReceiver recv = SynchronousResultReceiver.get(); 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 = new SynchronousResultReceiver(); + final SynchronousResultReceiver recv = SynchronousResultReceiver.get(); 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 = new SynchronousResultReceiver(); + final SynchronousResultReceiver recv = SynchronousResultReceiver.get(); gatt.transferSetInfo(bda, serviceData , advHandle, wrapper, mAttributionSource, recv); recv.awaitResultNoInterrupt(getSyncTimeout()).getValue(null); } catch (RemoteException | TimeoutException e) { |