Android系统 电话开发笔记
原创
©著作权归作者所有:来自51CTO博客作者达达智能的原创作品,请联系作者获取转载授权,否则将追究法律责任
连心的电话代码路劲
vendor/commons/carriers/Extension/apps/Dialer/
主界面:dialtacts_activity.xml
DialtactsActivity.java
ListsFragment.java 这个是通讯记录的界面 fragment
CallLogQueryHandler 这个是查询通讯记录的
DialtactsActivity的actionbar的样式: DialtactsThemeHiddenActionBar
phone_favorites_fragment.xml
phone_no_favorites.xml
showDialpadFragment 方法 显示menu
CallDetailActivity 通话记录详情
通讯记录list Item 界面
res/layout-notouch/call_log_list_item.xml
src/com/android/dialer/calllog/MSimCallLogFragment.java
private void updateVoicemailStatus(Cursor statusCursor) {
final Listener listener = mListener.get();
if (listener != null) {
listener.onVoicemailStatusFetched(statusCursor);
}
}
private void updateVoicemailUnreadCount(Cursor statusCursor) {
final Listener listener = mListener.get();
if (listener != null) {
listener.onVoicemailUnreadCountFetched(statusCursor);
}
}
private void updateMissedCallsUnreadCount(Cursor statusCursor) {
final Listener listener = mListener.get();
if (listener != null) {
listener.onMissedCallsUnreadCountFetched(statusCursor);
}
}
通话界面IncallUI
通话界面: src/com/android/incallui/MSimInCallActivity.java
incalluiRes/layout/incall_screen_msim.xml
通话界面fragment src/com/android/incallui/CallButtonFragment.java
修改声音大小的事件:
/**
* Checks for supporting modes. If bluetooth is supported, it uses the audio
* pop up menu. Otherwise, it toggles the speakerphone.
*/
protected void onAudioButtonClicked() {
Log.d(this, "onAudioButtonClicked: " +
CallAudioState.audioRouteToString(getPresenter().getSupportedAudio()));
if (isSupported(CallAudioState.ROUTE_BLUETOOTH)) {
showAudioModePopup();
} else {
getPresenter().toggleSpeakerphone();
}
}