Though it should be fine, reloading the callUIAdapter is a bit heavy
handed. And the current implementation is prone to being broken, since
we sometimes forget not to treat callUIAdapter as a singleton.
Longer term we can find a way to either: make callUIAdapter a true
singleton or possibly make callUIAdapter a private member of something
which *is* a true singleton.
Since we only *need* it to be reloaded the one time the migration runs
(or when a user changes settings which should be rare) it makes sense to
remove it from the happy path.
// FREEBIE
callUIAdapter is not a singleton (for better or for worse)
No one should hold a reference directly to it, but rather via the
CallService, which is a singleton
Wait a bit longer for initial call screen before terminating. Especially
first call can hit this limit.
When call *does* take too long to show, terminate properly to ensure
we're not left with a phantom call
// FREEBIE
Don't obscure message text on smaller form factors
Also, disable overzealous assert with non-callkit adapters. The adapter
is not a singleton, it gets rebuilt whenever call related privacy
settings are triggered.
// FREEBIE
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
connection.
For legacy reasons, the call sender used to wait until after receiving
the call answer before sending the ICE updates. The primary motivation
was that if the receiving user hadn't accepted a new identity change,
rather than just seeing one "Tap to Accept New Safety Number" messages
for a call, they'd see one for the call offer and then a dozen more as
ICE updates trickled in.
We changed that behavior long ago, and effectively all clients will
avoid that case, while sending ICE updates immediately will allow calls
to connect without having to wait for an additional serialized round
trip between the caller and call recipient.
// 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
This affects iOS 8, 9, and to a lesser degree iOS10.
On iOS11, presenting an alert causes the keyboard/inputAccessoryView to
temporarily dismiss.
// 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
Assigning dataChannel sometimes happens after iceConnect.
Fixes symptom where Alice calls Bob.
Bob answers and sees the call UI as normal
but Alice sees call as continuing to ring
// 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