Starting new activity that will not support multi-window
<p>My <code>MainActivity</code> supports Android N's new multi-window mode. However, I would like my <code>AwesomeActivity</code> to NOT support multi-window. </p>

<p>I have tried the following:</p>

<p><strong>AndroidManifest.xml</strong></p>

<pre><code>&lt;activity
    android:name=".activities.MainActivity"
    android:label="@string/app_name"
    android:windowSoftInputMode="stateHidden"/&gt;
&lt;activity android:name=".activities.AwesomeActivity"
    android:resizeableActivity="false" /&gt;
</code></pre>

<p><strong>MainActivity.java</strong></p>

<pre><code>Intent intent = new Intent(this, AwesomeActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
//removing CLEAR_TOP and SINGLE_TOP has no effect either
//Intent.FLAG_ACTIVITY_CLEAR_TASK in conjunction with Intent.FLAG_ACTIVITY_NEW_TASK does not have an effect either
</code></pre>

<p>I thought that by adding the <code>Intent.FLAG_ACTIVITY_NEW_TASK</code> (with or without <code>Intent.FLAG_ACTIVITY_CLEAR_TASK</code>), this would mean that <code>AwesomeActivity</code> would be the root activity in its own task stack and therefore, I should not be able to get to multi-window mode at <code>AwesomeActivity</code>.</p>

<p>However, this does not work, I can still switch to multi-window mode from <code>AwesomeActivity</code>, which is not the desired behavior.</p>

<p>Although the combination of <code>Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_MULTIPLE_TASK</code> seems to work to launch AwesomeActivity this doesn't work in the sense that if you put the app in the background while in AwesomeActivity, then bring the AwesomeActivity back to the foreground, you will be unable to go back to MainActivity as it was wiped from the task stack. I believe in most cases, the user would want to be able to return to <code>MainActivity</code> so this solution is not sufficient. </p>