We've long allowed users to configure what shows up in message
notifications:
- name: content (by default)
- just name (no content)
- generic notification (no name nor content)
Now we're dual purposing that setting to apply to calls. If someone
doesn't want to show names in the message notifications, presumably also
don't want that name showing up in the call log.
Also, since the earlier CallKit/iCloud issues had been addressed before
iOS11, we upgrade all iOS11 users to the more intuitive CallKit
interface.
Also: introduce "use system call logs" toggle when available. It will be
enabled by default, but we disable it for legacy users who'd explicitly
opted *out* of CallKit.
// FREEBIE
If CallKit privacy is enabled, we'll always use the system default
ringer.
If CallKit privacy is *not* enabled we'll use any ringtone specified in
the for that contact in the address book, else fall back to the default
// FREEBIE
- sync speakerphone state manipulated from system call screen
- Revert audio session after call failure, ensures media plays out of
speaker after placing a failing call.
- Replace notification with delegate pattern since we're already using
delegate pattern here.
- Fixes voiceover accessibility after voice memo
- Avoid audio blip after pressing hangup
- Rename CallAudioSession -> OWSAudioSession
Going to start using it for other non-call things since we want to
gather all our audio session concerns.
- Resume background audio when done playing video
- Extract OWSVideoPlayer which ensures audio is in proper state before
playback
- Move recording session logic to shared OWSAudioSession
- Deactivate audio session when complete
// FREEBIE
By centralizing AudioSession management onto the AudioService, we can
avoid enabling the RTCAudioSession while we're mid-ring.
Also allows us to centralize and remove redundant audio session logic.
// FREEBIE
It's not clear why we were ever dispatching `sync` here.
Before this:
Place a call
See "connecting..."
Hang up
UI hangs for ~5 seconds
See "call failed" on CallKit screen
Press "cancel" on CallKit screen
returned to responsive app.
// FREEBIE
More fallout from the outbound call timeout which was causing all
CallKit calls not promptly answered to show "Call Failed"
Inserting the timeout exacerbated an existing issue: We can't wait for
long before choosing to fulfill/fail an action without CallKit falling
over and assuming the call failed.
We don't actually need to consider the case where we "fail to initiate"
the outgoing call. Instead we say it started "successfully, and if there
is an error, the existing promise error handling will fail the call at
that time.
// FREEBIE
- Previously only incoming calls had their timeout promise fulfilled
- Previously we'd stop the timeout once ringing started, but we
should continue the timeout clock until the users are speaking.
// FREEBIE