def multi_call_join_conference_call_hangup_conf_call( self, pri_dut, sec_dut, ter_dut): self.log.info( "Test 2 incomming calls scenario to phone then join the calls, then terminate the call from the primary dut." ) input("Press enter to execute this testcase...") if not self.setup_multi_call(sec_dut, ter_dut, pri_dut): return False input("Press enter to join active calls...") calls = pri_dut.droid.telecomCallGetCallIds() pri_dut.droid.telecomCallJoinCallsInConf(calls[0], calls[1]) time.sleep(WAIT_TIME_IN_CALL) if num_active_calls(self.log, pri_dut) != 4: self.log.error("Total number of call ids in {} is not 4.".format( pri_dut.serial)) return False input("Press enter to hangup conf call...") if not hangup_call(self.log, pri_dut): self.log.error("Failed to hangup call") return False return True
def multi_call_join_conference_call_audio_routes(self, pri_dut, sec_dut, ter_dut): self.log.info( "Test 2 incomming calls scenario to phone then join the calls, then test different audio routes." ) input("Press enter to execute this testcase...") if not self.setup_multi_call(sec_dut, ter_dut, pri_dut): return False input("Press enter to join active calls...") calls = pri_dut.droid.telecomCallGetCallIds() pri_dut.droid.telecomCallJoinCallsInConf(calls[0], calls[1]) time.sleep(WAIT_TIME_IN_CALL) if num_active_calls(self.log, pri_dut) != 4: self.log.error("Total number of call ids in {} is not 4.".format( pri_dut.serial)) return False input("Press enter to switch to phone speaker...") self.log.info("Switching to earpiece.") set_audio_route(self.log, pri_dut, AUDIO_ROUTE_EARPIECE) time.sleep(self.short_timeout) if get_audio_route(self.log, pri_dut) != AUDIO_ROUTE_EARPIECE: self.log.error( "Audio Route not set to {}".format(AUDIO_ROUTE_EARPIECE)) return False input("Press enter to switch to Bluetooth...") self.log.info("Switching to Bluetooth...") set_audio_route(self.log, pri_dut, AUDIO_ROUTE_BLUETOOTH) time.sleep(self.short_timeout) if get_audio_route(self.log, pri_dut) != AUDIO_ROUTE_BLUETOOTH: self.log.error( "Audio Route not set to {}".format(AUDIO_ROUTE_BLUETOOTH)) return False input("Press enter to hangup conf call...") if not hangup_call(self.log, pri_dut): self.log.error("Failed to hangup call") return False return True
def outgoing_multi_call_join_conference_call(self, pri_dut, sec_dut, ter_dut): self.log.info( "Test 2 outgoing calls scenario from phone then join the calls.") input("Press enter to execute this testcase...") outgoing_num = get_phone_number(self.log, sec_dut) if not initiate_call(self.log, pri_dut, outgoing_num): self.log.error("Failed to initiate call") return False if not wait_and_answer_call(self.log, sec_dut): self.log.error("Failed to answer call.") return False time.sleep(self.short_timeout) outgoing_num = get_phone_number(self.log, ter_dut) if not initiate_call(self.log, pri_dut, outgoing_num): self.log.error("Failed to initiate call") return False if not wait_and_answer_call(self.log, ter_dut): self.log.error("Failed to answer call.") return False input("Press enter to join active calls...") calls = pri_dut.droid.telecomCallGetCallIds() pri_dut.droid.telecomCallJoinCallsInConf(calls[0], calls[1]) time.sleep(WAIT_TIME_IN_CALL) if num_active_calls(self.log, pri_dut) != 4: self.log.error("Total number of call ids in {} is not 4.".format( pri_dut.serial)) return False input("Press enter to hangup call 1...") if not hangup_call(self.log, sec_dut): self.log.error("Failed to hangup call") return False input("Press enter to hangup call 2...") if not hangup_call(self.log, ter_dut): self.log.error("Failed to hangup call") return False return True