Re-enable debug application IDs (#3607)

This commit is contained in:
Phil Oliver 2025-11-03 21:32:17 -05:00 committed by GitHub
parent e9bc9c9b15
commit 78a10118a0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 15 additions and 14 deletions

View file

@ -111,6 +111,6 @@ constructor(
Timber.e("Failed to start service from activity - but ignoring because bind will work: ${ex.message}")
}
connect(activity, MeshService.createIntent(), BIND_AUTO_CREATE + BIND_ABOVE_CLIENT)
connect(activity, MeshService.createIntent(activity), BIND_AUTO_CREATE + BIND_ABOVE_CLIENT)
}
}

View file

@ -197,7 +197,7 @@ class MeshService : Service() {
startService(context)
}
fun createIntent() = Intent().setClassName("com.geeksville.mesh", "com.geeksville.mesh.service.MeshService")
fun createIntent(context: Context) = Intent(context, MeshService::class.java)
/**
* The minimum firmware version we know how to talk to. We'll still be able to talk to 2.0 firmwares but only

View file

@ -38,7 +38,7 @@ class ServiceStarter(appContext: Context, workerParams: WorkerParameters) : Work
// Indicate whether the task finished successfully with the Result
Result.success()
} catch (ex: Exception) {
Timber.e("failure starting service, will retry", ex)
Timber.e(ex, "failure starting service, will retry")
Result.retry()
}
}
@ -72,7 +72,7 @@ fun MeshService.Companion.startService(context: Context) {
// to Signal or whatever.
Timber.i("Trying to start service debug=${BuildConfig.DEBUG}")
val intent = createIntent()
val intent = createIntent(context)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
try {
context.startForegroundService(intent)