如果我正在JUnit测试中,现在有两个呼叫:一个处于活动状态,另一个处于保留状态。
mInstrumentation = InstrumentationRegistry.getInstrumentation();
mInstrumentation.getUiAutomation().executeShellCommand( "input keyevent " + KeyEvent.KEYCODE_ENDCALL );
我使用上面的代码,但是它将同时结束活动呼叫和保持呼叫。我该如何以编程方式结束当前通话?