mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
hotfix 0.3.7 - don't ask for permissions in simulation, boolean was backwards
This commit is contained in:
parent
ef5c59705e
commit
51a1245068
3 changed files with 13 additions and 4 deletions
|
|
@ -216,6 +216,14 @@ class MainActivity : AppCompatActivity(), Logging,
|
|||
grantResults: IntArray
|
||||
) {
|
||||
super.onRequestPermissionsResult(requestCode, permissions, grantResults)
|
||||
|
||||
if (grantResults.contains(PackageManager.PERMISSION_DENIED)) {
|
||||
Toast.makeText(
|
||||
this,
|
||||
getString(R.string.permission_missing),
|
||||
Toast.LENGTH_LONG
|
||||
).show()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -271,7 +279,7 @@ class MainActivity : AppCompatActivity(), Logging,
|
|||
model.ownerName.value = prefs.getString("owner", "")!!
|
||||
|
||||
val isInTestLab = (application as GeeksvilleApplication).isInTestLab
|
||||
|
||||
|
||||
// Ensures Bluetooth is available on the device and it is enabled. If not,
|
||||
// displays a dialog requesting user permission to enable Bluetooth.
|
||||
if (bluetoothAdapter != null && !isInTestLab) {
|
||||
|
|
@ -288,7 +296,7 @@ class MainActivity : AppCompatActivity(), Logging,
|
|||
.show()
|
||||
}
|
||||
|
||||
if (isInTestLab)
|
||||
if (!isInTestLab)
|
||||
requestPermission() // permissions don't work there
|
||||
|
||||
/* not yet working
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue