kopia lustrzana https://github.com/meshtastic/Meshtastic-Android
0.4.5 some old phones complain about permissions they don't understand
rodzic
3380cb0b8a
commit
513f56f88f
|
@ -17,8 +17,8 @@ android {
|
|||
applicationId "com.geeksville.mesh"
|
||||
minSdkVersion 22 // The oldest emulator image I have tried is 22 (though 21 probably works)
|
||||
targetSdkVersion 29
|
||||
versionCode 144
|
||||
versionName "0.4.4"
|
||||
versionCode 145
|
||||
versionName "0.4.5"
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
buildTypes {
|
||||
|
|
|
@ -175,10 +175,8 @@ class MainActivity : AppCompatActivity(), Logging,
|
|||
Manifest.permission.ACCESS_FINE_LOCATION,
|
||||
Manifest.permission.BLUETOOTH,
|
||||
Manifest.permission.BLUETOOTH_ADMIN,
|
||||
Manifest.permission.WAKE_LOCK,
|
||||
Manifest.permission.REQUEST_COMPANION_RUN_IN_BACKGROUND,
|
||||
Manifest.permission.REQUEST_COMPANION_USE_DATA_IN_BACKGROUND
|
||||
|
||||
Manifest.permission.WAKE_LOCK
|
||||
|
||||
// We only need this for logging to capture files for the simulator - turn off for most users
|
||||
// Manifest.permission.WRITE_EXTERNAL_STORAGE
|
||||
)
|
||||
|
@ -186,6 +184,12 @@ class MainActivity : AppCompatActivity(), Logging,
|
|||
if (Build.VERSION.SDK_INT >= 29) // only added later
|
||||
perms.add(Manifest.permission.ACCESS_BACKGROUND_LOCATION)
|
||||
|
||||
// Some old phones complain about requesting perms they don't understand
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
perms.add(Manifest.permission.REQUEST_COMPANION_RUN_IN_BACKGROUND)
|
||||
perms.add(Manifest.permission.REQUEST_COMPANION_USE_DATA_IN_BACKGROUND)
|
||||
}
|
||||
|
||||
val missingPerms = perms.filter {
|
||||
ContextCompat.checkSelfPermission(
|
||||
this,
|
||||
|
|
Ładowanie…
Reference in New Issue