Skip to content

Commit

Permalink
Service: Remove unnecessary code
Browse files Browse the repository at this point in the history
This is a trivial patch that fixes bugs related to loading models
whenever the service is created.

Signed-off-by: Wook Song <[email protected]>
  • Loading branch information
wooksong authored and niley7464 committed Sep 24, 2024
1 parent 573d5fb commit 2877793
Showing 1 changed file with 0 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,6 @@ class MainService : Service() {
HandlerThread("ServiceStartArguments", Process.THREAD_PRIORITY_BACKGROUND).apply {
start()
}
this.applicationContext

serviceLooper = handlerThread.looper
serviceHandler = MainHandler(serviceLooper)
Expand All @@ -268,11 +267,6 @@ class MainService : Service() {
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
Toast.makeText(this, "Starting the MainService", Toast.LENGTH_SHORT).show()

serviceHandler.obtainMessage().also { msg ->
msg.arg1 = startId
serviceHandler.sendMessage(msg)
}

startForeground()

// If we get killed, after returning from here, restart
Expand Down

0 comments on commit 2877793

Please sign in to comment.