从TelephonyConnectionService到拨号
2015-11-18 15:29:07   1  举报             
     
         
 TelephonyConnectionService是一个关键的系统服务,它负责管理设备的语音和数据连接。当用户需要拨打电话时,这个服务会被激活。首先,用户在拨号界面输入电话号码,然后点击拨号按钮。这时,TelephonyConnectionService会接收到这个指令,开始建立电话连接。这个过程包括查找网络运营商,建立数据传输通道等步骤。一旦连接建立成功,用户就可以通过设备进行通话了。在整个过程中,TelephonyConnectionService都会确保连接的稳定性和质量,以提供最佳的通话体验。
    作者其他创作
 大纲/内容
 return一个失败的Connection,cause scheme is not type tel
  originalConnection==null
  uri=ConnectionRequest.geAddress
  connection.setDisconnected
  catch到异常,connection.setDisconnected
  这个方法会return不能类型的connection(GSM/CDMA)
  定义拨号handle使scheme=tel
  return一个失败的Connection,cause by phoneis null
  phone=getPhoneForAccount(ConnectionRequest.getAccountHandle)
  phone.addParticipant(number)return;
  isAddParticipant
  yes
  connection.setOriginalConnection(originalConnection);
  !isSkipSchemeOrConfUri&&number为空
  no
  返回失败的情况1.STATE_OUT_OF_SERVICE && phone.isUtEnable && number.endWith(\"#\")2.STATE_POWER_OFF3.不是STATE_IN_SERVICE和STATE_EMERGENCY_ONLY
  onCreateOutingConnection
  传入的参数PhoneAccountHandleConnectionRequest
  return一个失败的Connection,cause invalid number
  returny一个失败的Connection,cause by号码不支持
  根据state处理是否要返回失败的Connection
  phoneType==GSM
  return一个失败的Connection,cause invalid phone type
  start MMIDialogActivity
  phone=null
  对connection做一些设置、初始化
  !isSkipSchemeOrConUri &&Uri == null
  scheme==voicemail
  return一个失败的Connection,cause no number set
  !isSkipSchemeOrConfUri&&scheme!=tel
  number == null
  当Telecom Frameworl的ConnectionService在createConnection时,会调用到TelephonyConnectService中的函数onCreateOutgoingConnection去创建Connection,创建之后,会调用ConnectionServiceAdapter的handleCreateConnectionComplete去向上层更新状态
  connection==null
  用phone建立一个telephonyConnection
  placeOutgoingConnection
  phone = getPhoneForAccount
  if(uri==null)uri=”“;
  phone==null
  createConnectionFor
   
 
 
 
 
  0 条评论
 下一页
  
   
   
   
   
  
  
  
  
  
  
  
  
 