Check for home activity when switching focus.

When finishing or stopping an activity the code was automatically
refocusing to the next activity on the same stack independent of the
task's onTopOfHome flag. When the activity eventually finished or
stopped it would then honor the onTopOfHome flag.

This fix examines the onTopOfHome flag and arranges the focus
correctly if home is the next activity to run.

Fixes bug 11318263.

Change-Id: I73a8f5e82de04b01acaffe366b085f9e475e1451
1 file changed