mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-27 08:55:54 +03:00
reformat kotlin
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
parent
f242b5fcec
commit
fb04505663
1 changed files with 6 additions and 4 deletions
|
@ -374,17 +374,19 @@ class LocationPickerController(args: Bundle) :
|
|||
fun isCoarseLocationGranted(): Boolean {
|
||||
return PermissionChecker.checkSelfPermission(
|
||||
context!!,
|
||||
Manifest.permission.ACCESS_COARSE_LOCATION) == PermissionChecker.PERMISSION_GRANTED
|
||||
Manifest.permission.ACCESS_COARSE_LOCATION
|
||||
) == PermissionChecker.PERMISSION_GRANTED
|
||||
}
|
||||
|
||||
fun isFineLocationGranted() : Boolean {
|
||||
fun isFineLocationGranted(): Boolean {
|
||||
return PermissionChecker.checkSelfPermission(
|
||||
context!!,
|
||||
Manifest.permission.ACCESS_FINE_LOCATION) == PermissionChecker.PERMISSION_GRANTED
|
||||
Manifest.permission.ACCESS_FINE_LOCATION
|
||||
) == PermissionChecker.PERMISSION_GRANTED
|
||||
}
|
||||
|
||||
return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
isCoarseLocationGranted() && isFineLocationGranted()
|
||||
isCoarseLocationGranted() && isFineLocationGranted()
|
||||
} else {
|
||||
true
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue