Move desired task to top if not already there.

Under certain circumstances when launching a new activity, the
topmost stack activity is moved to the front even though the
activity is being created in a different task.

This checks if the topmost stack task matches the desired
task and if not, moves the desired task to the top.

Also make activity dump ordering consistent.

Fixes bug 17721767.

Change-Id: I59397f31b629a208f3863887c57d6f6fb1f6e1f3
1 file changed