Skip to content

Commit

Permalink
all: better bluetooth initialization (fixes #2032) (#2039)
Browse files Browse the repository at this point in the history
Co-authored-by: dogi <[email protected]>
  • Loading branch information
Okuro3499 and dogi authored Jun 5, 2024
1 parent 557ece5 commit 2de1787
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package io.treehouses.remote

import android.content.Context
import android.content.SharedPreferences
import android.os.Bundle
import android.os.Handler
import android.os.Looper
import android.os.Message
Expand Down Expand Up @@ -36,6 +37,13 @@ open class BaseInitialActivity: PermissionActivity(), NavigationView.OnNavigatio

protected lateinit var currentTitle: String

lateinit var mChatService: BluetoothChatService

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
mChatService = BluetoothChatService()
}

override fun setChatService(service: BluetoothChatService) {
mChatService = service
mChatService.updateHandler(mHandler)
Expand Down Expand Up @@ -166,6 +174,5 @@ open class BaseInitialActivity: PermissionActivity(), NavigationView.OnNavigatio
companion object {
@JvmStatic
var instance: BaseInitialActivity? = null
lateinit var mChatService: BluetoothChatService
}
}

0 comments on commit 2de1787

Please sign in to comment.