title: Current Activity (with SingleTask launchMode) does not Resume after returning from Home Screen (Calls onNewIntent for launcher Activity instead)
body: <p>I have two activities, a Splash Activity (which starts up when the launcher icon is clicked), and a Map activity (which is started up later by an intent after the user logs in). </p>
  
  <p>Sometimes when Map Activity is open, I go to the home screen, then try to resume the app where I left off a couple of seconds later. I have noticed that when I click on the launcher icon on the home screen to resume the current activity (Map Activity), I am instead re-directed to Splash activity.  This goes against the behavior that is listed in the Android documentation.</p>
  
  <p>According to the documentation:
  "When the user leaves a task by pressing the Home button, the current activity is stopped and its task goes into the background. The system retains the state of every activity in the task. If the user later resumes the task by selecting the launcher icon that began the task, the task comes to the foreground and <strong>resumes the activity at the top of the stack.</strong>”</p>
  
  <p>When map activity is running, my back stack is:</p>
  
  <pre><code>---MapActivity (front-facing activity)
  ---SplashActivity
  </code></pre>
  
  <p>When I click home, I see onStop() being called in MapActivity (as expected), but when I click on the launcher activity, MapActivity is then destroyed and onNewIntent is called in SplashActivity. Does anyone know what is causing this behavior?  </p>
  
  <p>My Android Manifest is:</p>
  
  <pre><code> &lt;activity
      android:name=".SplashActivity"
      android:exported="true"
      android:launchMode="singleTask"&gt;
      &lt;intent-filter&gt;
          &lt;action android:name="android.intent.action.MAIN" /&gt;
          &lt;action android:name="com.deca.mw.SplashActivity" /&gt;
          &lt;category android:name="android.intent.category.DEFAULT" /&gt;
          &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
      &lt;/intent-filter&gt;
  &lt;activity
      android:name=".activity.MapActivity"
      android:hardwareAccelerated="true"
      android:launchMode="singleTask" &gt;
      &lt;intent-filter&gt;
          &lt;action android:name="android.intent.action.SEARCH" /&gt;
      &lt;/intent-filter&gt;
  &lt;/activity&gt;
  </code></pre>
  
  <p>And the intent to start MapActivity is: </p>
  
  <pre><code>   Intent intent = new Intent(appContext, MapActivity.class);
     intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
     appContext.startActivity(intent);
  </code></pre>