title: Context wants FLAG_ACTIVITY_NEW_TASK but I've already set that flag
body: <p>I've created a common re-usable class for the company I work for to create some common interface elements. </p>
  
  <p>The class, takes in a single parameter as in the construct: an application context. </p>
  
  <p>one of the methods, <code>ContentClickableRowWithIcon</code> allows you to pass in an intent to be used as the click action. </p>
  
  <p>heres the full method declaration:</p>
  
  <p><code>public LinearLayout ContentClickableRowWithIcon(Drawable icon, String title, Intent i, final Boolean chooser)</code></p>
  
  <p>that last attribute there is used in the onClickEvent to determine whether to invoke a Chooser or just go right into the intent. </p>
  
  <pre><code>public LinearLayout ContentClickableRowWithIcon(Drawable icon, String title, Intent i, final Boolean chooser) {
  
      LinearLayout ll = new LinearLayout(mContext);
  
      // ..  LinerLayout construction, has nothing to do with the action
  
      i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); // this is apparently getting ignored... (ps: i've tried i.setFlags as well)
  
      final Intent intent = i;
  
      ll.setOnClickListener(new OnClickListener() {
  
          public void onClick(View v) {
  
              if(chooser)
                  mContext.startActivity(Intent.createChooser(intent, "Complete With...")); // crashes here with: android.util.AndroidRuntimeException: Calling startActivity() from outside of an Activity  context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?
              else
                  mContext.startActivity(intent); // this works fine
  
          }
      });
  
      return ll;
  }
  </code></pre>
  
  <p>As mentioned in the comments, anytime I dont provide the ability to use a chooser, everything works fine (everything in this list gets a new activity flag, im well aware of this and will cleanup when this issue is figured out)</p>
  
  <p>The moment I do, throws the exception:
  <code>android.util.AndroidRuntimeException: Calling startActivity() from outside of an Activity  context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?</code></p>
  
  <p>I've run out of ideas...</p>
  
  <p>/// EDIT:: Worth noting, on debug, the flags attribute in the Intent is set to <code>268435456</code> with addFlags and <code>268435456</code> with setFlags, when it reaches the time to use the intent in the onClick action</p>