mirror of
https://github.com/SimpleMobileTools/Simple-Flashlight.git
synced 2025-02-16 20:00:40 +01:00
Inline handlePermissionResult
This commit is contained in:
parent
dabdfdcd7d
commit
e190cac2a3
@ -336,11 +336,7 @@ class MainActivity : ComponentActivity() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun getPermissionResultHandler(isSos: Boolean): (Boolean) -> Unit = {
|
private fun getPermissionResultHandler(isSos: Boolean): (Boolean) -> Unit = { granted ->
|
||||||
handlePermissionResult(isSos, it)
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun handlePermissionResult(isSos: Boolean, granted: Boolean) {
|
|
||||||
if (granted) {
|
if (granted) {
|
||||||
cameraPermissionGranted(isSos)
|
cameraPermissionGranted(isSos)
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user