Commit Graph

40 Commits (d4d9be9f0cd68d42837096cf5a23290d9a8ad577)

Author SHA1 Message Date
Michael Kirk 1bfe691895 In app notifications for iOS10+
Extract shared notification presention/response

Implement adapters which use that logic for modern UNUserNotification and
legacy UINotifications
7 years ago
Michael Kirk ac3bbe26ba rename CallNotificationsAdapter->NotificationsAdapter 7 years ago
Michael Kirk 3b4188f34b hoist audio session singleton to Environment 7 years ago
Michael Kirk d6a6024f37 Update PromiseKit 7 years ago
Matthew Chen 5b50e81b4f Rename fail macros in Swift. 7 years ago
Matthew Chen cf6f3841a8 Apply new Swift logging. 7 years ago
Michael Kirk 82e559d11b Use swift macros for main thread assert 7 years ago
Matthew Chen 26001e49d1 Unify log tags. 7 years ago
Matthew Chen 6caa5b87b6 Add more asserts around thread in SAE. 8 years ago
Michael Kirk ec9538a3e4 Fix 2fa registration screen layout
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
8 years ago
Michael Kirk 707ab5f5a8 Minimize changes around call audio activity
// FREEBIE
8 years ago
Michael Kirk 4dd1c7813a Instrument calls to ensure audio session is maintained
// FREEBIE
8 years ago
Michael Kirk abb51b565a Don't de-activate audio sesion when other audio activities are happening
// FREEBIE
8 years ago
Michael Kirk c646f76335 Garther audio concerns, clean up session when done
- 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
8 years ago
Matthew Chen 7a1e47cd26 Add asserts around Swift singletons. 8 years ago
Matthew Chen 8cc33b3de1 Refine loading view of share extension. 8 years ago
Michael Kirk a11d83187b WIP: Framework-friendly - compiles but crashes on launch
// FREEBIE
8 years ago
Michael Kirk 30b50e1489 Activate audio at the proper time
// FREEBIE
8 years ago
Michael Kirk b77e331732 Unify Mute/Hold audio handling
// FREEBIE
8 years ago
Michael Kirk c7642cc628 Fix volume burst when call connects
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
8 years ago
Michael Kirk 81d7f28253 Timer to ensure call screen shown
// FREEBIE
8 years ago
Matthew Chen d639d6557e Add owsFail free function for swift.
// FREEBIE
8 years ago
Michael Kirk 36c09aeb84 cleanup ahead of PR
// FREEBIE
8 years ago
Michael Kirk ff93732ed7 WIP: fix call from contacts when signal hasn't been launched yet 8 years ago
Michael Kirk 2ec893d315 Ensure we're retaining all promises to completion
// FREEBIE
9 years ago
Matthew Chen 0893930485 Handle “busy signal” appropriately.
// FREEBIE
9 years ago
Matthew Chen af289145b5 Rework concurrency in the signaling logic.
// FREEBIE
9 years ago
Matthew Chen 2ef80e569d Improve thread safety in call ui adapter and adatapees.
// FREEBIE
9 years ago
Matthew Chen d560aa022a Reworked call view’s remote video mode. 9 years ago
Matthew Chen a65d3b7c4e Add video-related views.
// FREEBIE
9 years ago
Michael Kirk 814aec6cdd Recover CallKit state when remote client fails to hangup
Distinguish between localHangup, remoteHangup, and call failure.

This allows us to put CallKit in the proper state, ready to receive new
calls without having a backlog of phantom calls which haven't been
properly removed.

Note the "call error" occurs at the point ICE fails, which takes a
while. Anecdotally, like 10 seconds, which feels like a long to be
talking into the ether.

I briefly considered failing at 'disconnected', which happens much
sooner, but that's actually a recoverable state. E.g. if you toggle
airplane mode you can see that you bounce into `disconnected` and then
back to `connected`, so I don't think we'd want to fail the call as long
as WebRTC considers it "recoverable".

// FREEBIE
9 years ago
Michael Kirk 6c14f2f500 Fix "Answer" from iOS9 notification doesn't init audio
The removed code was from an older eon. CallService shouldn't be touched
except via the CallUIAdapter since only there is the omnipresent
distinction between CallKit vs. NonCallKit made.

i.e. when the RTCAudioSession get's started depends on the
CallUIAdaptee.

// FREEBIE
9 years ago
Michael Kirk 3ee94d57d9 Only NonCallKit adaptee uses manual ringing
- stop executing ringer code on CallKit which manages ringing for us.
- Organize ringing code more clearly.

// FREEBIE
9 years ago
Matthew Chen 9e739433c5 Start work on video.
// FREEBIE
9 years ago
Michael Kirk dbb29d7d7e Don't require recording permissions until call is ringing.
We do this by manually managing the RTCAudioSession.
Unfortunately to do this we have to include a couple of RTC headers not
exported by the default build of WebRTC.framework (see: Libraries/WebRTC)

// FREEBIE
9 years ago
Michael Kirk 1ed39976ee make public protocol method implementations public
responding to CR

// FREEBIE
9 years ago
Michael Kirk f6e6e6b787 CallViewController only accesses CallService via the CallUIAdapter
This is an effort to better define boundaries and simplify
relationships.

This also fixes a theoretical problem where CallKit was showing the in-app
call screen before the call was successfully answered, now we wait until
the action is fulfilled.

// FREEBIE
9 years ago
Michael Kirk 947a637669 Sync "mute" controls between CallKit
In the process, extracted the CallDelegate to allow the
CAllViewController to observe useful call state properties (call.state
and call.isMuted)

// FREEBIE
9 years ago
Michael Kirk c7449db289 remove stubbed audio manager implementation until it's clear what to do
with it.

// FREEBIE
9 years ago
Michael Kirk 647b2b37e9 WIP: WebRTC calling
* Ensure NotificationsManager has dependencies
    Otherwise it's easy to mess up the order of the required dependencies.
* move AccountManager into Environment, it's heavy to construct

// FREEBIE
9 years ago