FLAG_ACTIVITY_CLEAR_TASK not work with FLAG_ACTIVITY_REORDER_TO_FRONT
<p>I have a problem with an activity which is started with FLAG_ACTIVITY_REORDER_TO_FRONT is not recreated and present on the screen after FLAG_ACTIVITY_CLEAR_TASK.</p>

<p>So the step is:</p>

<ol>
<li>Open app, enter Welcome Activity.</li>
<li>Finish Welcome activity and start activity A without specific intent flag.</li>
<li>Start activity B with FLAG_ACTIVITY_REORDER_TO_FRONT from activity A (new instance of B is created and now stack became A->B).</li>
<li>Start activity A from B with FLAG_ACTIVITY_REORDER_TO_FRONT (existing A instance brought to top of stack so stack became B->A).</li>
<li>And under some condition, I need to start over from the beginning (just like another normal app launch), so started Welcome activity using FLAG_ACTIVITY_CLEAR_TASK.</li>
</ol>

<p>So the app will enter phase 2 again after phase 1, which is what I expected, but then, if I try to start activity B again with FLAG_ACTIVITY_REORDER_TO_FRONT from activity A, there is activity B's callback 'onNewIntent, onStart, onResume' in a row, but it doesn't present on the screen. 
It looks like to me that there is still the previous instance of activity B somewhere but not showing to me.</p>

<p>I don't specify launch mode for either activity A or B.</p>

<p>I know that document says about FLAG_ACTIVITY_CLEAR_TASK that "This can only be used in conjunction with FLAG_ACTIVITY_NEW_TASK.". And use them together does solve my problem, but then if I click home button to put app background and then launch again, it will become another app launch (enter phase 1) but not back to the previous top activity.</p>

<p>So my questions are:</p>

<ol>
<li>When I use FLAG_ACTIVITY_CLEAR_TASK to start welcome activity, I don't see onDestroy of either activity A or B, is it by design?</li>
<li>If they are not destroyed, where do they stay and can I have a reference to them?</li>
<li>How can I make activity B presented on the screen after all of these steps?</li>
</ol>

<p>Code for phase 5:</p>

<pre><code>Intent i = new Intent(A.this, WelcomeActivity.class);
i.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(i);
</code></pre>

<p>Thanks in advance.</p>

<p>AndroidManifest.xml</p>

<pre><code> &lt;activity
            android:name=".activity.WelcomeActivity"
            android:configChanges="keyboardHidden|orientation|screenSize"
            android:screenOrientation="portrait"
            &lt;intent-filter&gt;
                &lt;action android:name="android.intent.action.MAIN" /&gt;

                &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
            &lt;/intent-filter&gt;
        &lt;/activity&gt;

&lt;activity
            android:name=".activity.A_Activity"
            android:configChanges="keyboardHidden|orientation|screenSize"
            android:screenOrientation="portrait"
            android:theme="@style/BaiduMapTheme.MainMap"
            android:windowSoftInputMode="adjustPan" /&gt;

&lt;activity
            android:name=".activity.B_Activity"
            android:configChanges="locale|fontScale|keyboard|keyboardHidden|layoutDirection|mcc|mnc|navigation|orientation|screenLayout|screenSize|touchscreen|uiMode"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="stateVisible" /&gt;
</code></pre>