You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
Write Espresso.pressBack() on the activity where pressing back once doesn't
exit the app.
What is the expected output? What do you see instead?
Expected: The app does what it is expected to do when back is pressed
Actual:
com.google.android.apps.common.testing.ui.espresso.NoActivityResumedException:
Pressed back and killed the app
What version of the product are you using? On what operating system?
Espresso 1.1
Please provide any additional information below.
This is a very rare problem, but it happens. I know know how UiController
handles activity lifecycle, but it seems like it doesn't wait until activity to
be resumed to continue. As a result, the following codes at the end of
pressBack() can sometimes get no activity, because it's in the middle of
switching activity:
if (this.key.getKeyCode() == KeyEvent.KEYCODE_BACK) {
controller.loopMainThreadUntilIdle();
boolean activeActivities = !ActivityLifecycleMonitorRegistry.getInstance()
.getActivitiesInStage(Stage.RESUMED)
.isEmpty();
if (!activeActivities) {
Throwable cause = new PerformException.Builder()
.withActionDescription(this.getDescription())
.withViewDescription(HumanReadables.describe(view))
.build();
throw new NoActivityResumedException("Pressed back and killed the app", cause);
}
}
I checked my error log and found that it calls
getActivitiesInStage(Stage.RESUMED) when my previous activity is in pause and
the next activity which should show up after the back was still on its way to
resumed.
Original issue reported on code.google.com by K76...@gmail.com on 17 Jan 2014 at 5:53
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
K76...@gmail.com
on 17 Jan 2014 at 5:53The text was updated successfully, but these errors were encountered: