Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Stefan Zabka
Companion App Android
Commits
d627d0c1
Commit
d627d0c1
authored
Aug 22, 2019
by
Anon
Browse files
LowEfforService: Move logging to ConnectionService.
parent
c4dd4a06
Changes
2
Show whitespace changes
Inline
Side-by-side
app/src/main/java/de/ccc/events/badge/card10/common/ConnectionService.kt
View file @
d627d0c1
...
...
@@ -165,7 +165,13 @@ object ConnectionService {
}
fun
writeCharacteristic
(
characteristic
:
BluetoothGattCharacteristic
):
Boolean
{
return
connection
?.
writeCharacteristic
(
characteristic
)
?:
false
val
status
=
connection
?.
writeCharacteristic
(
characteristic
)
?:
false
if
(!
status
)
{
Log
.
d
(
TAG
,
"Write status: $status"
)
}
return
status
}
}
\ No newline at end of file
app/src/main/java/de/ccc/events/badge/card10/filetransfer/LowEffortService.kt
View file @
d627d0c1
...
...
@@ -80,13 +80,7 @@ class LowEffortService(
val
bytes
=
packet
.
getBytes
()
centralTx
.
value
=
bytes
val
status
=
ConnectionService
.
writeCharacteristic
(
centralTx
)
if
(!
status
)
{
Log
.
d
(
TAG
,
"Write status: $status"
)
}
return
status
return
ConnectionService
.
writeCharacteristic
(
centralTx
)
}
fun
setOnPacketReceivedListener
(
packetListener
:
OnPacketReceivedListener
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment