cypher121
03/03/2017, 12:40 AMval su = async { Shell.SU.available() }
//some work that doesn't need it
//assume no superuser
if (su.getNow(false))
if you need it on the main thread later on or maybe something like async {
val suTask = async { Shell.SU.available() }
//some more work on another thread
val su = await(suTask)
if (su) ...
}