This is an image from android documentation:

[![enter image description here](https://i.stack.imgur.com/QuKsm.png)](https://i.stack.imgur.com/QuKsm.png)

Activity Y has 'singleTask' launch mode but it is not root activity in the task, that is Activity X. How did it happen?

Upd.:

From the [documentation](http://developer.android.com/guide/components/tasks-and-back-stack.html):

> 
> "singleTask"
> 
> 
> The system creates a new task and instantiates the activity at the root of the new task. However, if an instance of the activity already exists in a separate task, the system routes the intent to the existing instance through a call to its onNewIntent() method, rather than creating a new instance. Only one instance of the activity can exist at a time.
> Note: Although the activity starts in a new task, the Back button still returns the user to the previous activity.
> 
> 
>