refactor(ble): Centralize BLE logic into a core module (#4550)

Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
This commit is contained in:
James Rich
2026-02-20 06:41:52 -06:00
committed by GitHub
parent 7a68802bc2
commit 6bfa5b5f70
214 changed files with 3471 additions and 2405 deletions
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025 Meshtastic LLC
* Copyright (c) 2025-2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -14,7 +14,6 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package org.meshtastic.core.prefs.analytics
import android.content.SharedPreferences
@@ -25,9 +24,9 @@ import org.meshtastic.core.prefs.NullableStringPrefDelegate
import org.meshtastic.core.prefs.PrefDelegate
import org.meshtastic.core.prefs.di.AnalyticsSharedPreferences
import org.meshtastic.core.prefs.di.AppSharedPreferences
import java.util.UUID
import javax.inject.Inject
import javax.inject.Singleton
import kotlin.uuid.Uuid
/** Interface for managing analytics-related preferences. */
interface AnalyticsPrefs {
@@ -66,7 +65,7 @@ constructor(
private var _installId: String? by NullableStringPrefDelegate(appPrefs, "appPrefs_install_id", null)
override val installId: String
get() = _installId ?: UUID.randomUUID().toString().also { _installId = it }
get() = _installId ?: Uuid.random().toString().also { _installId = it }
override fun getAnalyticsAllowedChangesFlow(): Flow<Boolean> = callbackFlow {
val listener =