mirror of
https://github.com/SimpleMobileTools/Simple-Flashlight.git
synced 2025-06-05 21:59:19 +02:00
Inline handlePermissionResult
This commit is contained in:
@ -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 {
|
||||||
|
Reference in New Issue
Block a user