mirror of
https://github.com/kavishdevar/librepods.git
synced 2026-05-04 03:46:12 +00:00
android: don't start service every time MainActivity is launched
This commit is contained in:
@@ -291,7 +291,6 @@ fun Main() {
|
|||||||
|
|
||||||
if (permissionState.allPermissionsGranted && (canDrawOverlays || overlaySkipped.value)) {
|
if (permissionState.allPermissionsGranted && (canDrawOverlays || overlaySkipped.value)) {
|
||||||
val context = LocalContext.current
|
val context = LocalContext.current
|
||||||
context.startService(Intent(context, AirPodsService::class.java))
|
|
||||||
|
|
||||||
val navController = rememberNavController()
|
val navController = rememberNavController()
|
||||||
|
|
||||||
@@ -378,7 +377,7 @@ fun Main() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
serviceConnection = remember {
|
serviceConnection = remember {
|
||||||
object : ServiceConnection {
|
object : ServiceConnection {
|
||||||
override fun onServiceConnected(name: ComponentName?, service: IBinder?) {
|
override fun onServiceConnected(name: ComponentName?, service: IBinder?) {
|
||||||
val binder = service as AirPodsService.LocalBinder
|
val binder = service as AirPodsService.LocalBinder
|
||||||
|
|||||||
Reference in New Issue
Block a user