awaitAppDeaths

suspend fun awaitAppDeaths(after: Long, timeout: Duration, packageName: String? = null): List<AppDeath>(source)

Waits until a death after after is recorded (of packageName when given; AppDeath.watched says whether it counts), at most timeout, and returns the deaths after after, oldest first: empty when none came in time. Fails when the device is detached meanwhile. The wait runs on the server and does not count as use of a held connection, so it never keeps an idle session alive. Changes nothing: the deaths stay unhandled.