FLAG_ACTIVITY_NEW_TASK not working as expected
<p>I have a stack with 3 Activities: <code>A, B, C</code>. From <code>Activity C</code> I start the <code>Activity B</code> setting on the Intent the flag: <code>FLAG_ACTIVITY_NEW_TASK</code>. According to the documentation this should bring the <code>Activity B</code> with the underlying task on the front resulting in a stack : <code>A, B, C, A, B</code>. 
However the actual stack is <code>A, B, C, B</code>. When I press the Back-Button from the <code>Activity B</code> I go through the above stack in the reverse order: <code>B -&gt; C -&gt; B -&gt; A</code>.
The code which starts the the <code>Activity B</code> from <code>Activity C</code> is:</p>

<pre><code>Intent intent = new Intent(this, B.class);
intent.setFlag(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
</code></pre>

<p>According to the docs the flag <code>FLAG_ACTIVITY_NEW_TASK</code> causes the same behavour as the <code>"singleTask"</code> launchMode value. If I set in the <code>AndroidManifest.xml</code> file the launchmode <code>"singletask"</code> on the <code>Activity B</code>, then it produces the expected behavour as described in the docs: the task <code>A, B</code> comes to the front resulting in a stack <code>A, B, C, A, B</code>. 
Why does not it work with the flag <code>FLAG_ACTIVITY_NEW_TASK</code>? Is some <code>affinity</code> configuaration also necessary in this case?      </p>