Skip to content

Commit e7c4a44

Browse files
committed
Update LowEnergyScanCallback
1 parent cad8b26 commit e7c4a44

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Sources/AndroidBluetooth/AndroidCentralCallback.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,13 @@ extension AndroidCentral.LowEnergyScanCallback {
6868
setSwiftPeer(0)
6969
}
7070

71-
@JavaMethod("Swift_onScanResult")
72-
func onScanResult(_ swiftPeer: Int64, error: Int32, result: AndroidBluetooth.ScanResult?) {
71+
@JavaMethod
72+
func Swift_onScanResult(_ swiftPeer: Int64, error: Int32, result: AndroidBluetooth.ScanResult?) {
7373
guard let central = central(swiftPeer), let result, let scanData = try? ScanData(result) else {
7474
assertionFailure()
7575
return
7676
}
77-
central.log?("\(type(of: self)): \(#function) name: \(try? result.getDevice().getName() ?? "") address: \(try? result.getDevice().getAddress())")
77+
central.log?("\(type(of: self)): \(#function) name: \((try? result.getDevice().getName()) ?? "") address: \(result.getDevice().getAddress())")
7878
Task {
7979
await central.storage.update { state in
8080
state.scan.continuation?.yield(scanData)

0 commit comments

Comments
 (0)