Assigned
Status Update
Comments
mf...@gmail.com <mf...@gmail.com> #2
Please add new state when call is connected or expose APIs to check when call is answered.
CALL_STATE_IDLE, CALL_STATE_RINING and CALL_STATE_OFFHOOK states are not very usefull unless we have connected / active state.
CALL_STATE_IDLE, CALL_STATE_RINING and CALL_STATE_OFFHOOK states are not very usefull unless we have connected / active state.
di...@android.com <di...@android.com> #4
Is this issue resolved?
en...@google.com <en...@google.com> #5
we truly need it we cannot know when the other person answer the phone!
ph...@gmail.com <ph...@gmail.com> #6
Is it possible to detect outgoing call is answered or not in android?
an...@gmail.com <an...@gmail.com> #7
how can i detect if a call is left unanswered.
op...@gmail.com <op...@gmail.com> #8
Any updates on this please ??
ph...@gmail.com <ph...@gmail.com> #9
There are no renewals so far:no further states are available;
[Deleted User] <[Deleted User]> #11
Can you just mark an issue that is going on for over an year as obsolete without even stating any reason for doing so?
ia...@gmail.com <ia...@gmail.com> #12
Is there any other way to know how an outgoing call has been answered, like read the call log programmatically, to interact with the O.S. when it starts the call duration of log -> 00:01, when the call is connected ?
ke...@auxbrain.com <ke...@auxbrain.com> #13
AS the originator, I agree that it should not be made obsolete, at least not without an explanation. The old non-smart phone allowed you direct access to the AT module so you could see connects.
In fact this can be done by reading call logs but the problem with this is that the phone needs to be rooted. The logs actually show AT commands and responses as specified in the GSM standard.
I for one would still need this.
In fact this can be done by reading call logs but the problem with this is that the phone needs to be rooted. The logs actually show AT commands and responses as specified in the GSM standard.
I for one would still need this.
en...@google.com <en...@google.com>
en...@google.com <en...@google.com> #14
Quite unfortunate that this bug has been marked Obsolete. I definitely is NOT. I am looking for a workaround too.
en...@google.com <en...@google.com> #15
I try to detect phone answered on out going call with CallLog duration time in programmatically. But we can't get the duration time of current calls. CallLog Database just being queried after insert DB with the finish of calls.
Description
The problem was observed while developing a native app using ndk-r8b.
The symptom is: AStorageManager_getMountedObbPath() randomly returns corrupt strings. In my case, i would estimate about 1/5 of every invocation of the function fails.
1.1) Relevant sample code (my app):
static void obbCallback(const char* filename, const int32_t state, void* data)
{
switch( state ) {
case AOBB_STATE_MOUNTED:
PrefixDir = strdup(AStorageManager_getMountedObbPath(engineGlobal->storageManager, filename));
LOGI("obbCallback mounted as %s\n", PrefixDir);
1.2) Output from logcat
I/OPPP ( 895): obbCallback mounted as /mnt/obb/ee81fba48478bfaf8edcb00f605a8e22
(this is the good one)
I/OPPP ( 895): obbCallback mounted as /mnt/obb/ee81fba48478bfaf8edcb00f605a8e2@
(last "2" replaced for "@")
I/OPPP ( 895): obbCallback mounted as /mnt/obb/ee81fba48478bfaf8edcb00f605a8e2P
(last "2" replaced for "P")
I/OPPP ( 913): obbCallback mounted as /mnt/obb/ee81fba48478bfaf8ed
(string truncated)
1.3) Architectures affected
Bug has been seen under Android 2.3.3 (emulator) and Android 2.3.6 (samsung phone). Evidence (below) is that it is still present in latest versions as well.
2) Bug analysis
2.1) Relevant Android code:
2.2) Analysis
AStorageManager_getMountedObbPath is just a proxy:
const char* AStorageManager_getMountedObbPath(AStorageManager* mgr, const char* filename) {
return mgr->getMountedObbPath(filename);
}
The real function is AStorageManager::getMountedObbPath:
const char* getMountedObbPath(const char* filename) {
String16 filename16(filename);
String16 path16;
if (mMountService->getMountedObbPath(filename16, path16)) {
return String8(path16).string();
} else {
return NULL;
}
}
2.3) The problem is:
- String8() object is constructed from path16.
- String8(const String16&) constructor uses allocFromUTF16() to allocate from SharedBuffer.
- string() method just returns the pointer of String8::mString.
- The object gets out of scope. Destructor will call SharedBuffer::release()
- The returned pointer now refers to an object that has just been freed.
- Results are unpredictable. Any new allocation will cause string corruption.
3) Fixes? Workarounds?
I can't thing of any. Suggestions?