Ensure that activities behind keyguard are paused.

TLDR: Having a resumed activity behind keyguard can cause the keyguard
not to be dismissed.

Swiping the home button to launch Google Now causes an ASSIST intent
to be launched. The ASSIST intent starts SearchActivity which then
launches GEL. If an activity is resumed behind the keyguard when this
happens then that activity will be paused.

Because that activity is PAUSING, ActivityStackSupervisor
startActivityLocked() doesn't call dismissKeyguard() immediately.
Instead dismissKeyguard will be called later when GEL switches from
not-visible to visible. However, if the paused activity happens to be
GEL then there is never a not-visible to visible transition and
dismissKeyguard never gets called.

This fix removes an unnecessary call to resumeTopActivitiesLocked
which was causing activities behind the lockscreen to be resumed.

This fixes bug 10732489 except immediately after boot. Pausing the
initial activity if the lockscreen is visible after boot is deferred
for another CL.

Change-Id: I323262596ae41bc5a2700bae5942f6a4fba80936
1 file changed