DO NOT MERGE: Don't let previous activity wait if next activity won't be visible

If the next resumed activity won't be visible because of keyguard, it
doesn't make sense to let the previous activity wait for the next
activity becoming visible. Worse, it would make other activities going
to the stopped state need to wait unnecessarily.

Bug: 125550126
Bug: 124556520
Test: atest ActivityManagerDisplayLockedKeyguardTests
Change-Id: Id6f2e562c84b167b6736813ea6dc183536587d30
1 file changed