Skip to content

Instantly share code, notes, and snippets.

@ShinichiroFunatsu
Created July 9, 2019 11:05
Show Gist options
  • Save ShinichiroFunatsu/14611e6c6ca198d593bf1b3f06436551 to your computer and use it in GitHub Desktop.
Save ShinichiroFunatsu/14611e6c6ca198d593bf1b3f06436551 to your computer and use it in GitHub Desktop.
private fun getRootWindowPackageName(): String? =
InstrumentationRegistry
.getInstrumentation()
.uiAutomation
.rootInActiveWindow
?.packageName
?.toString()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment