Assigned
Status Update
Comments
se...@squareup.com <se...@squareup.com> #2
Update: according to the trace, dex2oat starts at the same moment as the application. So i guess, the problem lays in xiaomi firmware that starts the optimization with the application during benchmark
cc...@google.com <cc...@google.com> #3
As a workaround, you can use the following instead of startActivityAndWait(), which is
context.startActivity(intent)
check(device.wait(
Until.hasObject(By.pkg(packageName).depth(0)),
30_000
)) { "package did not display in 30 seconds!" }
Now that we have a more robust implementation of launch completion detection within macrobench, we should be able to switch back to context.startActivity()
in startActivityAndWait
, without having to wait so long for UiAutomator to detect the package.
Note if device.wait doesn't work reliably, or the delay is too long, you can either use Thread.sleep
, or copy the macrobench
Description
Component used: Macrobenchmark Version used: 1.1.0-rc01 Devices/Android versions reproduced on: All
Cannot use custom Parcelable in extras of Intent for
startActivityAndWait()
. Can only use primitive types.