https://code.google.com/p/android/issues/detail?id=223871
Android 7.0, Nexus 9.
- MainActivity has visible ProgressBar.
- Start SecondActivity from the MainActivity.
- Back to the MainActivity by tapping back key.
- Then, SecondActivity's onStop() is not called immediately.
- After 10 seconds, onStop() is called with following warning.
W/ActivityManager: Launch timeout has expired, giving up wake lock!
This problem does not happen if the ProgressBar is not visible.
And this problem does not happen on Android 6.0.1, Nexus 5.
On Android 7.1.1, this problem still happens. ProgressBar is not the heart of problem.
Android 7.1.1, Emulator(x86)
- MainActivity has a visible ProgressBar and a rotating view.
- Start SecondActivity from the MainActivity.
- Back to the MainActivity by tapping back key.
- Then, SecondActivity's onStop() is not called immediately.
- After 10 seconds, onStop() is called with following warning.
When all animations stopped, SecondActivity#onStop()
is called immediatley.