File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,11 @@ extension AndroidCentral {
2222
2323 weak var central : AndroidCentral ?
2424
25- init ( central: AndroidCentral , environment: JNIEnvironment ? ) {
25+ @JavaMethod
26+ @_nonoverride convenience init ( environment: JNIEnvironment ? = nil )
27+
28+ convenience init ( central: AndroidCentral , environment: JNIEnvironment ? = nil ) {
29+ self . init ( environment: environment)
2630 self . central = central
2731 }
2832 }
@@ -36,15 +40,15 @@ extension AndroidCentral.LowEnergyScanCallback {
3640 guard let central else {
3741 return
3842 }
39- central. log ? ( " \( type ( of: self ) ) : \( #function) name: \( result. getDevice ( ) . getName ( ) ?? " " ) address: \( result. getDevice ( ) . getAddress ( ) ) " )
4043 guard let result, let scanData = try ? ScanData ( result) else {
4144 assertionFailure ( )
4245 return
4346 }
47+ central. log ? ( " \( type ( of: self ) ) : \( #function) name: \( result. getDevice ( ) . getName ( ) ?? " " ) address: \( result. getDevice ( ) . getAddress ( ) ) " )
4448 Task {
4549 await central. storage. update { state in
4650 state. scan. continuation? . yield ( scanData)
47- state. scan. peripherals [ scanData. peripheral] = InternalState . Scan. Device (
51+ state. scan. peripherals [ scanData. peripheral] = AndroidCentral . InternalState. Scan. Device (
4852 scanData: scanData,
4953 scanResult: result
5054 )
You can’t perform that action at this time.
0 commit comments