JBQ
--
Jean-Baptiste M. "JBQ" Queru
Software Engineer, Android Open-Source Project, Google.
Questions sent directly to me that have no reason for being private
will likely get ignored or forwarded to a public forum with no further
warning.
Thanks for the offer, but we don't need that. We are working on the
ICS patches already, and plan to submit them next week. In the
meantime it would really help our effort if somebody from the Android
Telephony team would look at our questions.
Thanks,
Gergely
2012/1/23 Jean-Baptiste Queru <j...@android.com>:
Thank you very much for taking the time reviewing our patches.
To summarize, there are 2 main topics that you brought up:
1. Eliminate the duplication in the DTMF sending code (between the
DTMF service and the Dialer) -- sure, we will refactor it.
2. Include some sanity checks to make sure that the current active
call when mPhone.startDtmf() ... etc. is called is still the same call
the user intended to send the DTMF codes.
In order to make these sanity checks, we have to somehow retrieve the
identity of the call, and pass it along with the DTMF send request.
The call chain looks something like this:
DTMF sender app -> TelephonyManager ---- <<binder>> ---->
PhoneInterfaceManager (ITelephony implementation) ----> async dispatch
--> call to the internal Telephony API (e.g. startDtmf(),
getForegroundCall ... etc.)
Both the binder communication and the async dispatch may cause the
request to be queued, so that the active call changes by the time the
request gets there. We can certainly implement a mechanism to retrieve
the current foreground call's id inside the TelephonyManager, and pass
it along the DTMF send request, which we can check before we actually
start sending the DTMF codes. Do you think this is a good solution, or
you had something else in mind?
I have another question: Do you think the intent based interface makes
sense for sending DTMF codes? It looked like a good idea at the time,
but now I am not sure, since one has to deal with the TelephonyManager
directly anyway to check the call state, set up the phone listener ...
etc.
Best Regards,
Gergely
2012/1/26 Robert Greenwalt <rgree...@google.com>:
--
Kis Gergely
ügyvezető / CEO
MattaKis Consulting
Email: gerge...@mattakis.com
Web: http://www.mattakis.com
Phone: +36 70 408 1723
Fax: +36 27 998 622
Hi Robert,
Thank you very much for taking the time reviewing our patches.
To summarize, there are 2 main topics that you brought up:
1. Eliminate the duplication in the DTMF sending code (between the
DTMF service and the Dialer) -- sure, we will refactor it.
2. Include some sanity checks to make sure that the current active
call when mPhone.startDtmf() ... etc. is called is still the same call
the user intended to send the DTMF codes.
In order to make these sanity checks, we have to somehow retrieve the
identity of the call, and pass it along with the DTMF send request.
The call chain looks something like this:
DTMF sender app -> TelephonyManager ---- <<binder>> ---->
PhoneInterfaceManager (ITelephony implementation) ----> async dispatch
--> call to the internal Telephony API (e.g. startDtmf(),
getForegroundCall ... etc.)
Both the binder communication and the async dispatch may cause the
request to be queued, so that the active call changes by the time the
request gets there. We can certainly implement a mechanism to retrieve
the current foreground call's id inside the TelephonyManager, and pass
it along the DTMF send request, which we can check before we actually
start sending the DTMF codes. Do you think this is a good solution, or
you had something else in mind?
I have another question: Do you think the intent based interface makes
sense for sending DTMF codes? It looked like a good idea at the time,
but now I am not sure, since one has to deal with the TelephonyManager
directly anyway to check the call state, set up the phone listener ...
etc.
Just a small update and RFC:
I think we found a fairly simple and non-intrusive solution for making
sure that you send DTMFs to the call that you actually intended to
(not a bad thing when you consider phonebank passwords :) ).
The new PhoneStateListener method would look like this:
public void onPreciseCallStateChanged(int state, String[] addresses);
The values of the state parameter would match the Call.State enum values.
The addresses array would contain the addresses (usually phone
numbers) of the connected endpoints for the call. Unknown addresses
could be reported as a special UNKOWN_ADDRESS constant or empty
string.
The DTMF sending interfaces in TelephonyManager would look like this:
sendDtmf(String address, char c);
During sending the implementation would make sure that the call has a
connected connection with the specified address.
As an extra precaution we could also limit DTMF sending to calls with
a single connection. This would be a protection against an attacker
who can somehow add a second connection to a call while the send DTMF
request is in transit.
Also, DTMF codes could only be sent programmatically to calls with
known caller ids.
Do you like this proposal?
Best Regards,
Gergely
2012/1/31 Robert Greenwalt <rgree...@google.com>:
We just uploaded the new version of the DTMF patch to Gerrit.
It is divided in 3 parts:
1. frameworks/base: https://android-review.googlesource.com/#/c/32820/
- Adds the APIs to TelephonyManager and PhoneStateListener
- Adds the actual implementation to the CallManager and TelephonyRegistry
2. packages/apps/Phone: https://android-review.googlesource.com/#/c/32821/
- The ITelephony interface implementations required by the TelephonyManager API.
- The actual work is forwarded to the framework CallManager.
3. development/samples/DtmfTester:
https://android-review.googlesource.com/#/c/32810/
A detailed test application where you can try out the different
features of the new APIs, including:
- precise call state tracking
- sending DTMF codes
You need to pull all 3 patches to your tree to test it (well the 3rd
one is optional, if you want to write your own test app).
We look forward to your comments / suggestions.
Best Regards,
Gergely
2012/2/2 Gergely Kis <gerge...@mattakis.com>:
Now, that March is over and we survived all the April 1st jokes, would
it be possible to somehow expedite the review of this patch? There are
at least 93 people who are interested in this, according to the
following issue:
http://code.google.com/p/android/issues/detail?id=1428
Best Regards,
Gergely
2012/2/17 Gergely Kis <gerge...@mattakis.com>: