手机来电去电状态分析

一、来电
CALL_STATE_IDLE
CALL_STATE_RINGING:号码
①接听+挂断
CALL_STATE_RINGING:NULL
CALL_STATE_OFFHOOK

CALL_STATE_OFFHOOK
CALL_STATE_IDLE
②不接听直接挂断
CALL_STATE_RINGING:NULL
CALL_STATE_IDLE

二、去电
CALL OUT:号码
CALL_STATE_OFFHOOK
CALL_STATE_OFFHOOK
①对方接听以后,本地没有收到广播
②挂断
CALL_STATE_OFFHOOK
CALL_STATE_IDLE

小结
来电情况:
1. 响铃:CALL_STATE_IDLE + CALL_STATE_RINGING
2. 接听:CALL_STATE_RINGING + CALL_STATE_OFFHOOK
3. 挂断:(CALL_STATE_RINGINGCALL_STATE_OFFHOOK) + CALL_STATE_IDLE
去电情况:
1. 电话是否被接听:无法监听,因为没有广播变化
2. 挂断:CALL_STATE_OFFHOOK + CALL_STATE_IDLE

你可能感兴趣的:(PhoneCall)