0
0
Fork 0
mirror of https://github.com/YTVanced/VancedMicroG synced 2024-11-13 06:25:06 +00:00

Omit RPIs in log (#1464)

This commit is contained in:
fynngodau 2021-05-05 23:20:23 +02:00 committed by GitHub
parent aee45c22be
commit 9eb0adda9d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -138,8 +138,7 @@ class AdvertiserService : LifecycleService() {
database.generateCurrentPayload(aemBytes)
}
val data = AdvertiseData.Builder().addServiceUuid(SERVICE_UUID).addServiceData(SERVICE_UUID, payload).build()
val (uuid, _) = ByteBuffer.wrap(payload).let { UUID(it.long, it.long) to it.int }
Log.i(TAG, "Starting advertiser for RPI $uuid")
Log.i(TAG, "Starting advertiser")
if (Build.VERSION.SDK_INT >= 26) {
setCallback = SetCallback()
val params = AdvertisingSetParameters.Builder()
@ -201,8 +200,7 @@ class AdvertiserService : LifecycleService() {
@Synchronized
private fun stopOrRestartAdvertising() {
if (!advertising) return
val (uuid, _) = ByteBuffer.wrap(sendingBytes).let { UUID(it.long, it.long) to it.int }
Log.i(TAG, "Stopping advertiser for RPI $uuid")
Log.i(TAG, "Stopping advertiser")
advertising = false
if (Build.VERSION.SDK_INT >= 26) {
wantStartAdvertising = true