Last active
October 2, 2019 12:21
-
-
Save sagar-viradiya/69928654f40774efdfeb4320b7bac5f1 to your computer and use it in GitHub Desktop.
PermissionResult sealed class
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sealed class PermissionResult(val requestCode: Int) { | |
class PermissionGranted(requestCode: Int) : PermissionResult(requestCode) | |
class PermissionDenied( | |
requestCode: Int, | |
val deniedPermissions: List<String> | |
) : PermissionResult(requestCode) | |
class ShowRational(requestCode: Int) : PermissionResult(requestCode) | |
class PermissionDeniedPermanently( | |
requestCode: Int, | |
val permanentlyDeniedPermissions: List<String> | |
) : PermissionResult(requestCode) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment