title: singleTask and singleInstance not respected when using PendingIntent?
body: <p>I have an activity with launchMode set to singleTask:</p>
  
  <pre><code>&lt;activity
      android:name="com.blah.blah.MyActivity"
      android:launchMode="singleTask"&gt;
  &lt;/activity&gt;
  </code></pre>
  
  <p>I have an ongoing notification with a PendingIntent that launches that activity:</p>
  
  <pre><code>Intent activityIntent = new Intent( this,
                                      MyActivity.class );
  TaskStackBuilder stackBuilder = TaskStackBuilder.create( this );
  stackBuilder.addParentStack( MyActivity.class );
  stackBuilder.addNextIntent( activityIntent );
  PendingIntent resultingActivityPendingIntent = stackBuilder.getPendingIntent( REQUEST_CODE,
                                                                                PendingIntent.FLAG_UPDATE_CURRENT );
  ...
  m_notificationBuilder.setContentIntent( resultingActivityPendingIntent );
  startForeground( ONGOING_NOTIFICATION_ID,
                   m_notificationBuilder.build() );
  </code></pre>
  
  <p>When I am interacting with an existing MyActivity, then I hit Home and restart MyActivity via the launcher, MyActivity's <code>onNewIntent()</code> gets called as expected.</p>
  
  <p>The problem is that when I am interacting with an existing MyActivity, and I click on the ongoing notification, a new MyActivity is created via <code>onCreate()</code>, and the existing one is destroyed via <code>onDestroy()</code>.  I expected that MyActivity's <code>onNewIntent()</code> would be called instead.  Why doesn't this happen?</p>
  
  <p>I have tried these answers without success:</p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/19039189/intent-if-activity-is-running-bring-it-to-front-else-start-a-new-one-from-n">Intent - if activity is running, bring it to front, else start a new one (from notification)</a></li>
  <li><a href="https://stackoverflow.com/questions/16898047/how-to-make-notification-resume-and-not-recreate-activity">How to make notification resume and not recreate activity?</a></li>
  <li><a href="https://stackoverflow.com/questions/14482480/flag-activity-reorder-to-front-ignored">FLAG_ACTIVITY_REORDER_TO_FRONT ignored</a> (in this case the existing instance is not destroyed when the notification is clicked)</li>
  </ul>