kopia lustrzana https://github.com/meshtastic/Meshtastic-Android
don't leak macaddrs into logs - could be possibly personally identifying
rodzic
c00ca9b3db
commit
671bafa05f
|
@ -17,6 +17,7 @@ import com.geeksville.android.GeeksvilleApplication
|
|||
import com.geeksville.android.Logging
|
||||
import com.geeksville.concurrent.DeferredExecution
|
||||
import com.geeksville.mesh.IRadioInterfaceService
|
||||
import com.geeksville.mesh.anonymized
|
||||
import com.geeksville.util.exceptionReporter
|
||||
import com.geeksville.util.ignoreException
|
||||
import com.geeksville.util.toRemoteExceptions
|
||||
|
@ -178,7 +179,7 @@ class RadioInterfaceService : Service(), Logging {
|
|||
val address = getPrefs(context).getString(DEVADDR_KEY, null)
|
||||
|
||||
if (address != null && !allPaired.contains(address)) {
|
||||
warn("Ignoring stale bond to $address")
|
||||
warn("Ignoring stale bond to ${address.anonymized}")
|
||||
null
|
||||
} else
|
||||
address
|
||||
|
@ -440,7 +441,7 @@ class RadioInterfaceService : Service(), Logging {
|
|||
// device is off/not connected)
|
||||
val device = getBluetoothAdapter(this)?.getRemoteDevice(address)
|
||||
if (device != null) {
|
||||
info("Creating radio interface service. device=$address")
|
||||
info("Creating radio interface service. device=${address.anonymized}")
|
||||
|
||||
// Note this constructor also does no comm
|
||||
val s = SafeBluetooth(this, device)
|
||||
|
|
|
@ -26,6 +26,7 @@ import com.geeksville.android.Logging
|
|||
import com.geeksville.android.hideKeyboard
|
||||
import com.geeksville.mesh.MainActivity
|
||||
import com.geeksville.mesh.R
|
||||
import com.geeksville.mesh.anonymized
|
||||
import com.geeksville.mesh.model.UIViewModel
|
||||
import com.geeksville.mesh.service.RadioInterfaceService
|
||||
import com.geeksville.util.exceptionReporter
|
||||
|
@ -91,6 +92,10 @@ class BTScanModel(app: Application) : AndroidViewModel(app), Logging {
|
|||
|
||||
data class BTScanEntry(val name: String, val macAddress: String, val bonded: Boolean) {
|
||||
// val isSelected get() = macAddress == selectedMacAddr
|
||||
|
||||
override fun toString(): String {
|
||||
return "BTScanEntry(name=${name.anonymized}, addr=${macAddress.anonymized})"
|
||||
}
|
||||
}
|
||||
|
||||
override fun onCleared() {
|
||||
|
@ -264,7 +269,7 @@ class BTScanModel(app: Application) : AndroidViewModel(app), Logging {
|
|||
|
||||
/// Change to a new macaddr selection, updating GUI and radio
|
||||
fun changeScanSelection(context: MainActivity, newAddr: String) {
|
||||
info("Changing BT device to $newAddr")
|
||||
info("Changing BT device to ${newAddr.anonymized}")
|
||||
selectedMacAddr = newAddr
|
||||
changeDeviceSelection(context, newAddr)
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue