拨号盘按下SEND键如何获取最后一个拨出的号码:详见:DialpadFragment.java
/**
* Starts the asyn query to get the last dialed/outgoing
* number. When the background query finishes, mLastNumberDialed
* is set to the last dialed number or an empty string if none
* exists yet.
*/
private void queryLastOutgoingCall() {
mLastNumberDialed = EMPTY_NUMBER;
CallLogAsync.GetLastOutgoingCallArgs lastCallArgs =
new CallLogAsync.GetLastOutgoingCallArgs(
getActivity(),
new CallLogAsync.OnLastOutgoingCallComplete() {
public void lastOutgoingCall(String number) {
// TODO: Filter out emergency numbers if
// the carrier does not want redial for
// these.
mLastNumberDialed = number;
updateDialAndDeleteButtonEnabledState();
}
});
mCallLog.getLastOutgoingCall(lastCallArgs);
}