title: ClipboardManager OnPrimaryClipChangedListener is called twice for every copy
body: <p>When I copy text to the clipboard onPrimaryClipChanged method is called twice. Any ideas why?</p>
  <pre><code>@Override
  public boolean onCreateOptionsMenu(Menu menu) {
      getMenuInflater().inflate(R.menu.main, menu);
      final ClipboardManager cliboardManager = (ClipboardManager) getSystemService(CLIPBOARD_SERVICE);
  
      cliboardManager
              .addPrimaryClipChangedListener(new OnPrimaryClipChangedListener() {
  
                  @Override
                  public void onPrimaryClipChanged() {
                      ClipData clipData = cliboardManager.getPrimaryClip();
                      System.out
                              .println(&quot;********** clip changed, clipData: &quot;
                                      + clipData.getItemAt(0));
                  }
              });
      return true;
  }
  </code></pre>
  <p>Test case:
  Copying the text &quot;continue&quot; from the BBC web site will result in the following output:</p>
  <blockquote>
  <p>continue</p>
  <p>continue</p>
  </blockquote>
  <p>But if I debug the program I can see that the clipData object has value:</p>
  <blockquote>
  <p>ClipData { text/plain {T:continue } }</p>
  </blockquote>
  <p>the first time onPrimaryClipChanged() is called and</p>
  <blockquote>
  <p>ClipData { text/plain &quot;BBC - Homepage&quot; {T:continue } }</p>
  </blockquote>
  <p>the next time onPrimaryClipChanged() is called.</p>
  <p>So basically the first time ClipDescription is { text/plain } and the second time is ClipDescription { text/plain &quot;BBC - Homepage&quot; } (i.e including the title of the web page)</p>