title: Android pausing a broadcast receiver
body: <p>I've a Broadcast Receiver into my application that waits for the screen to go on/off. What I want to do is:</p>
  
  <pre><code>public void onReceive(Context context, Intent intent) {
      if (intent.getAction().equals(Intent.ACTION_SCREEN_OFF)) {
          pause some seconds...
          ...do something
      }
  }
  </code></pre>
  
  <p>How can I stop the current thread into the onReceive method?</p>