title: How to end an incoming call programmatically on Android 8.0 Oreo
body: <p>Up to Android 7.1 it was possible to end an incoming call by using the <strong><code>ITelephony.endCall()</code></strong> method and giving your app the permissions <strong><code>android.permission.CALL_PHONE</code></strong> and <strong><code>android.permission.READ_PHONE_STATE</code></strong>. </p>
  
  <p>When doing the same on <code>Android 8.0 Oreo (API 26)</code>, i get this error</p>
  
  <blockquote>
    <p>12-09 18:11:25.195 16833-16833/li.doerf.leavemealone
    E/TelephonyServiceCallHangup: Missing permission MODIFY_PHONE_STATE,
    cannot hangup call</p>
  </blockquote>
  
  <p>Since <strong><code>MODIFY_PHONE_STATE</code></strong> is a protected permission, my app cannot get it. Is there a way to programmatically end an incoming call on <code>Android 8.0+</code>? </p>