How to disconnect phone call by button?
<p>how to disconnect phone call by button.I am using following code:</p>

<pre><code>try {
        // Java reflection to gain access to TelephonyManager's
        // ITelephony getter
        Log.v(TAG, "Get getTeleService...");
        Class c = Class.forName(tm.getClass().getName());
        Method m = c.getDeclaredMethod("getITelephony");
        m.setAccessible(true);
        com.android.internal.telephony.ITelephony telephonyService = (ITelephony) m
                .invoke(tm);
    } catch (Exception e) {
        e.printStackTrace();
        Log.e(TAG, "FATAL ERROR: could not connect to telephony subsystem");
        Log.e(TAG, "Exception object: " + e);
</code></pre>
