libtaskmanager: consider current activity when computing first task index
For example, there are two activities. Two launchers are in one activity, and 3 launchers arein the other activity. Before this change the first task index will be 5 because the index doesn't consider the current activity. After this change the first task index will either be 2 or 3 depending on the current activity.
(cherry picked from commit a67e3674)