diff --git a/ml_inference_offloading/src/main/java/ai/nnstreamer/ml/inference/offloading/MainService.kt b/ml_inference_offloading/src/main/java/ai/nnstreamer/ml/inference/offloading/MainService.kt index dfea3d6..4e3622e 100644 --- a/ml_inference_offloading/src/main/java/ai/nnstreamer/ml/inference/offloading/MainService.kt +++ b/ml_inference_offloading/src/main/java/ai/nnstreamer/ml/inference/offloading/MainService.kt @@ -252,7 +252,6 @@ class MainService : Service() { HandlerThread("ServiceStartArguments", Process.THREAD_PRIORITY_BACKGROUND).apply { start() } - this.applicationContext serviceLooper = handlerThread.looper serviceHandler = MainHandler(serviceLooper) @@ -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