Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RecorderInCallService: Improve end-of-call detection
On older Samsung firmware, the telephony framework fails to notify InCallService implementations about call disconnections. This doesn't just happen with BCR. It affects Samsung's own apps too, like Knox's InCallServiceImpl. Due to this bug, none of the following callbacks are called when a call ends: * Call.Callback.onStateChanged with Call.STATE_DISCONNECTING or Call.STATE_DISCONNECTED * Call.Callback.onCallDestroyed * InCallService.onCallRemoved However, it does happen to call Call.Callback.onDetailsChanged when the call state transitions to Call.STATE_DISCONNECTED (which doesn't happen with AOSP). This commit reworks RecorderInCallService to keep track of calls better in the face of these firmware bugs. A call's lifetime begins when InCallService.onCallAdded is called and ends when either InCallService.onCallRemoved is called or the state is Call.STATE_DISCONNECTING or Call.STATE_DISCONNECTED in any other callback. This should work on both well-behaved firmware, like AOSP, and buggy firmware, like Samsung's OneUI. Issue: #143 Signed-off-by: Andrew Gunnerson <chillermillerlong@hotmail.com>
- Loading branch information
1 parent
6c8d95c
commit b86fa50
Showing
2 changed files
with
103 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters