mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
improve location enabled check
This commit is contained in:
parent
13fcf61cf4
commit
9b45ba84f7
2 changed files with 20 additions and 64 deletions
|
|
@ -38,6 +38,12 @@ fun Context.hasCompanionDeviceApi(): Boolean =
|
|||
packageManager.hasSystemFeature(PackageManager.FEATURE_COMPANION_DEVICE_SETUP)
|
||||
else false
|
||||
|
||||
/**
|
||||
* @return true if the device has a GPS receiver
|
||||
*/
|
||||
fun Context.hasGps(): Boolean =
|
||||
packageManager.hasSystemFeature(PackageManager.FEATURE_LOCATION_GPS)
|
||||
|
||||
/**
|
||||
* return a list of the permissions we don't have
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue