Add cancel button to permission dialogs

This commit is contained in:
iKirby 2024-02-27 22:36:18 +08:00 committed by 世界
parent 54be93167d
commit 57914db97f
No known key found for this signature in database
GPG key ID: CD109927C34A63C4
2 changed files with 3 additions and 0 deletions

View file

@ -350,6 +350,7 @@ class MainActivity : AbstractActivity(), ServiceConnection.Callback {
.setPositiveButton(R.string.ok) { _, _ ->
requestFineLocationPermission0()
}
.setNegativeButton(R.string.cancel, null)
.setCancelable(false)
.show()
}
@ -375,6 +376,7 @@ class MainActivity : AbstractActivity(), ServiceConnection.Callback {
.setPositiveButton(R.string.ok) { _, _ ->
backgroundLocationPermissionLauncher.launch(Manifest.permission.ACCESS_BACKGROUND_LOCATION)
}
.setNegativeButton(R.string.cancel, null)
.setCancelable(false)
.show()
}

View file

@ -3,6 +3,7 @@
<string name="stop">Stop</string>
<string name="ok">OK</string>
<string name="cancel">Cancel</string>
<string name="no_thanks">No, thanks</string>
<string name="title_dashboard">Dashboard</string>