如何通过按钮断开电话。我正在使用以下代码:
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);