Add a method to obtain task info with intent extra

Also change boolean parameters to bitwise flags to clean up the
signature. Fixed the unit test in RunningTasksTest because it didn't
set up the test correctly.

Bug: 185492118
Test: atest RunningTasksTest
Change-Id: Id6771c48de2e219acd998b39f82a71ed6e0c59a2
8 files changed