title: java.lang.IllegalStateException: Call while result is not pending
body: <p>I am creating dialer,i want to disconnect the call on click of a button, i am trying</p>
  
  <pre><code>public class OutgoingCallListener extends BroadcastReceiver {
  
      @Override
      public void onReceive(Context context, Intent intent) {     
              setResultData(null);
      }
  
  }
  </code></pre>
  
  <p>here i am called in button onclick function</p>
  
  <pre><code>try{
          OutgoingCallListener out = new  OutgoingCallListener();
          Intent intent = new Intent();
          out.onReceive(this, intent);    
      }catch(Exception e){
          Log.i("ii", "exception in end call", e);
      }
  </code></pre>
  
  <p>here complete log trace</p>
  
  <pre><code>exception in end call
      06-17 17:48:05.282: I/ii(17159): java.lang.IllegalStateException: Call while result is not pending
      06-17 17:48:05.282: I/ii(17159):    at android.content.BroadcastReceiver.checkSynchronousHint(BroadcastReceiver.java:780)
      06-17 17:48:05.282: I/ii(17159):    at android.content.BroadcastReceiver.setResultData(BroadcastReceiver.java:586)
      06-17 17:48:05.282: I/ii(17159):    at me.cs.oicalls.OutgoingCallListener.onReceive(OutgoingCallListener.java:14)
      06-17 17:48:05.282: I/ii(17159):    at me.cs.oicalls.CallOut.endCall(CallOut.java:106)
      06-17 17:48:05.282: I/ii(17159):    at java.lang.reflect.Method.invokeNative(Native Method)
      06-17 17:48:05.282: I/ii(17159):    at java.lang.reflect.Method.invoke(Method.java:525)
      06-17 17:48:05.282: I/ii(17159):    at android.view.View$1.onClick(View.java:3602)
      06-17 17:48:05.282: I/ii(17159):    at android.view.View.performClick(View.java:4212)
      06-17 17:48:05.282: I/ii(17159):    at android.view.View$PerformClick.run(View.java:17476)
      06-17 17:48:05.282: I/ii(17159):    at android.os.Handler.handleCallback(Handler.java:800)
      06-17 17:48:05.282: I/ii(17159):    at android.os.Handler.dispatchMessage(Handler.java:100)
      06-17 17:48:05.282: I/ii(17159):    at android.os.Looper.loop(Looper.java:194)
      06-17 17:48:05.282: I/ii(17159):    at android.app.ActivityThread.main(ActivityThread.java:5371)
      06-17 17:48:05.282: I/ii(17159):    at java.lang.reflect.Method.invokeNative(Native Method)
      06-17 17:48:05.282: I/ii(17159):    at java.lang.reflect.Method.invoke(Method.java:525)
      06-17 17:48:05.282: I/ii(17159):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:833)
      06-17 17:48:05.282: I/ii(17159):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
      06-17 17:48:05.282: I/ii(17159):    at dalvik.system.NativeStart.main(Native Method)
  </code></pre>