Created
March 3, 2022 01:09
-
-
Save Astroa7m/ad026748f8abf093c1e75b8e64119e81 to your computer and use it in GitHub Desktop.
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
inline fun<T> is29AndAbove( | |
func: () -> T | |
) :T?{ | |
return if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) | |
func.invoke() | |
else | |
null | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment