Skip to content

Instantly share code, notes, and snippets.

@dllewellyn
Created November 20, 2022 08:36
Show Gist options
  • Save dllewellyn/49776ad9c52fa8441c792fe9ef3a0890 to your computer and use it in GitHub Desktop.
Save dllewellyn/49776ad9c52fa8441c792fe9ef3a0890 to your computer and use it in GitHub Desktop.
val isSafe = safeToRun(
{ banAvdEmulatorCheck() },
{ banGenymotionEmulatorCheck() },
{ banBluestacksEmulatorCheck() },
{ isDebuggableCheck() },
{ rootDetectionCheck() }
)
if (!isSafe) {
throw RuntimeException("Device is not safe to run")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment