Do not update calling pid/uid if the task cannot be relinquished

The calling pid/uid was updated by the new task root activity
while the original task root activity finished. Since the updated
uid doesn't have the Uri permission to restart the task, so user
cannot launch the task from Recents.

Bug: 156335070
Test: atest RecentTasksTest, start tasks from Recents
Change-Id: Idc7d9ba03b0eea4e2ba979ab65a79b0f1e5b272a
1 file changed