added task affinity of each activity.