sforkowany z mirror/meshtastic-android
commit
f9e39b66a4
|
@ -31,7 +31,7 @@ android {
|
|||
minSdkVersion 21 // The oldest emulator image I have tried is 22 (though 21 probably works)
|
||||
targetSdkVersion 29
|
||||
versionCode 20102 // format is Mmmss (where M is 1+the numeric major number
|
||||
versionName "1.1.02"
|
||||
versionName "1.1.2"
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
buildTypes {
|
||||
|
|
|
@ -6,7 +6,6 @@ import android.app.PendingIntent
|
|||
import android.bluetooth.BluetoothDevice
|
||||
import android.bluetooth.BluetoothDevice.BOND_BONDED
|
||||
import android.bluetooth.BluetoothDevice.BOND_BONDING
|
||||
import android.bluetooth.BluetoothManager
|
||||
import android.bluetooth.le.*
|
||||
import android.companion.AssociationRequest
|
||||
import android.companion.BluetoothDeviceFilter
|
||||
|
@ -658,9 +657,13 @@ class SettingsFragment : ScreenFragment("Settings"), Logging {
|
|||
// The device the user is already paired with is offline currently, still show it
|
||||
// it in the list, but greyed out
|
||||
if (!hasShownOurDevice) {
|
||||
if (scanModel.selectedBluetooth != null && adapter != null && adapter.isEnabled) {
|
||||
// Note: we pull this into a tempvar, because otherwise some other thread can change selectedAddress after our null check
|
||||
// and before use
|
||||
val bleAddr = scanModel.selectedBluetooth
|
||||
|
||||
if (bleAddr != null && adapter != null && adapter.isEnabled) {
|
||||
val bDevice =
|
||||
adapter.getRemoteDevice(scanModel.selectedBluetooth)
|
||||
adapter.getRemoteDevice(bleAddr)
|
||||
if (bDevice.name != null) { // ignore nodes that node have a name, that means we've lost them since they appeared
|
||||
val curDevice = BTScanModel.DeviceListEntry(
|
||||
bDevice.name,
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit b6b1cca5ada3bc22c6b84761846e889315160db3
|
||||
Subproject commit 5cdd7bff56b0ea54351e5ea0e358e864b061078f
|
Ładowanie…
Reference in New Issue