Commit Graph

923 Commits (a4093a5f7f399a13ead925d46250898128b35a02)

Author SHA1 Message Date
Michael Kirk 0a95dac616 pull latest translations
Most of these haven't actually been translated yet.

// FREEBIE
8 years ago
Michael Kirk 158fe78ae2 bump build
// FREEBIE
8 years ago
Michael Kirk a6b5555910 fixup, return nil, not 0
// FREEBIE
8 years ago
Michael Kirk 2a9aa4c852 users can opt out of CallKit
// FREEBIE
8 years ago
Michael Kirk d8df4b9e35 Can receive calls while in settings
The existing presented settings (or fingerprint verification) modals
were preventing the display of the incoming call modal.

// FREEBIE
8 years ago
Matthew Chen 5687925513 Prevent simultaneous incoming and outgoing calls from leaving CallService in a bad state.
// FREEBIE
8 years ago
Matthew Chen 0893930485 Handle “busy signal” appropriately.
// FREEBIE
8 years ago
Michael Kirk 08425853cf re-use shared call strings
// FREEBIE
8 years ago
Michael Kirk a339f52564 Only touch mutable dict only main thread
* and make nonatomic since we're only assigning it in init

// FREEBIE
8 years ago
Michael Kirk 5d0d1b725b Already on the main thread
* simplify code
* fix typo

// FREEBIE
8 years ago
Michael Kirk 6b4dedfefe revert WebRTC related changes to AppAudioManager
Initially we were using AppAudioManager in our WebRTC calling
implementation to manage call related audio, but our differences from
how redphone uses the AppAudioManager diverged too much, so instead
we're instead using CallAudioManager.

reverting these changes lest we inadvertently break something re:
RedPhone.

// FREEBIE
8 years ago
Michael Kirk b6f098bfa7 Log when receiving unknown call datachannel message
// FREEBIE
8 years ago
Matthew Chen b868f07c33 Merge remote-tracking branch 'origin/feature/webrtc' into release/2.7.0 8 years ago
Matthew Chen 36356fbff6 Avoid crashes when closing peer connection client.
// FREEBIE
8 years ago
Matthew Chen dacb2840f2 Avoid crashes when closing peer connection client.
// FREEBIE
8 years ago
Matthew Chen f81feca2d6 Avoid crashes when closing peer connection client.
// FREEBIE
8 years ago
Michael Kirk 7361418274 Merge remote-tracking branch 'origin/master' into feature/webrtc 8 years ago
Michael Kirk cd36123bf1 rename method to better reflect how its used
// FREEBIE
8 years ago
Michael Kirk 7e825648ef Show alert when trying to call a non-signal contact from Contacts.
// FREEBIE
8 years ago
Michael Kirk b35c20a06b Don't handle intents pre iOS10.
// FREEBIE
8 years ago
Michael Kirk 17b89f44aa share global callUIAdapter, outboundCallInitiator
// FREEBIE
8 years ago
Michael Kirk bbfd9ba74d Place Signal/Redphone calls from system contacts
// FREEBIE
8 years ago
Matthew Chen 535770a92e Avoid crashes when closing peer connection client.
// FREEBIE
8 years ago
Matthew Chen 4dec1e2ded Avoid crashes when closing peer connection client.
// FREEBIE
8 years ago
Matthew Chen d4ba4c446b Respond to CR.
// FREEBIE
8 years ago
Matthew Chen b415b6142f Respond to CR, mainly by fixing broken tests.
// FREEBIE
8 years ago
Matthew Chen 49bb3d942d Clean up ahead of PR.
// FREEBIE
8 years ago
Matthew Chen d294557bdd Rework concurrency in the signaling logic.
// FREEBIE
8 years ago
Matthew Chen dd374afdaa Rework concurrency in the signaling logic.
// FREEBIE
8 years ago
Matthew Chen d6c849eab3 Revert whitespace changes.
// FREEBIE
8 years ago
Matthew Chen af289145b5 Rework concurrency in the signaling logic.
// FREEBIE
8 years ago
Matthew Chen d0b2aaac27 Specify AVAudioSession modes for calls.
// FREEBIE
8 years ago
Michael Kirk f1d8434868 More space for non-callkit incoming call buttons (#1660)
* More space for non-callkit incoming call buttons

The "decline" and "accept" were too close together. Added a spacer, the
same size as an extra button between the two.

* Tweak spacing in call view rows.

// FREEBIE
8 years ago
Matthew Chen 8454c7dc2f Log reconnect events as such.
// FREEBIE
8 years ago
Matthew Chen 5dd4655672 Ensure audio state when call connects.
// FREEBIE
8 years ago
Michael Kirk f9497240e2 bump release target
// FREEBIE
8 years ago
Matthew Chen b5aab60985 Respond to CR.
// FREEBIE
8 years ago
Matthew Chen e947276f73 Add drop shadows to text in call view.
// FREEBIE
8 years ago
Matthew Chen 40b3d038db Disable local video in background.
// FREEBIE
8 years ago
Michael Kirk 141a1bd176 Disable half-working call-holding feature all together
consolidated feature-disable logic for incoming/outgoing calls to make
it easier to document, and less likely to break when we *do* implement
CallHolding

// FREEBIE
8 years ago
Michael Kirk 969b73cad8 Implement call holding (call swapping still broken).
- Alice calls Bob on Signal and they start talking
- Charlie calls Alice on Not-Signal.
- Alice chooses to "Hold & Accept" putting Bob on Hold while the call with
  Charlie connects.
- If Alice ends the call with Charlie, we're back in Signal-iOS and
  talking to Bob, no problem.
- However, if, before ending the call with Charlie, Alice tries to swap
  *back* to bob, bob won't hear any audio in the callkit screen. Alice
  has to switch back to the Signal screen before the audio is transmitted.

// FREEBIE
8 years ago
Michael Kirk e425d351c7 WIP: incoming non-signal call while in outgoing signal call
Marking Signal-Call as started, changes the incoming call screen for
subsequent calls to show "Accept & End", "Send to VoiceMail" and "Accept
& Hold" instead of just "Accept" & "Decline"

Though - we don't support Holding. What we really want to see is just
"Accept & End" and "Decline | Send to Voicemail"

// FREEBIE
8 years ago
Matthew Chen c8e5884087 Respond to CR.
// FREEBIE
8 years ago
Matthew Chen 9a0a7bb6b1 Show alert when user tries to activate local video without camera permissions.
// FREEBIE
8 years ago
Matthew Chen da53368bc2 Show alert when user tries to activate local video without camera permissions.
// FREEBIE
8 years ago
Matthew Chen 2ef80e569d Improve thread safety in call ui adapter and adatapees.
// FREEBIE
8 years ago
Matthew Chen 50addfa4e8 Remove camera constraints.
// FREEBIE
8 years ago
Matthew Chen 6ce33381a8 Prevent screen from dimming or device from locking during video call.
// FREEBIE
8 years ago
Matthew Chen 40d7944120 Respond to CR.
// FREEBIE
8 years ago
Matthew Chen 9e34f87f0d Fix issues around how remote/local video states affect call view.
// FREEBIE
8 years ago
Matthew Chen 699b364ec7 Show/hide call view controls in remote video mode if user taps screen.
// FREEBIE
8 years ago
Michael Kirk 459d0d6012 Working around a bizarre crash on iOS 9
Without this, I get a SEGFAULT on iOS 9.3 device 1 in 3 calls when
accessing the RTC extern constants. Swift bug?

Currently using XCode 8.2

// FREEBIE
8 years ago
Michael Kirk fff061ff3f Make sure WebRTC preferences are synced *every* call
This slows the UI, but only for people who have locally opted into
WebRTC calls, and the alternative is that users are likely to have stale
settings the first time a pair of people opt-in.

// FREEBIE
8 years ago
Matthew Chen fe140b0da5 Updated the button icons in the call view’s “remote video” mode.
// FREEBIE
8 years ago
Matthew Chen bc00b87783 Reply to CR.
// FREEBIE
8 years ago
Matthew Chen 9c3ecbc77d Clean up ahead of PR.
// FREEBIE
8 years ago
Matthew Chen d560aa022a Reworked call view’s remote video mode. 8 years ago
Matthew Chen e2d6c574df Fix guard syntax.
// FREEBIE
8 years ago
Matthew Chen 204aeab69c Respond to CR.
// FREEBIE
8 years ago
Matthew Chen ec1f77c630 Polish video calls.
* Send and handle messages around video status.
* Fix handling of callee data channel.
* Fix layout of local video view.

// FREEBIE
8 years ago
Matthew Chen 48ca4fe865 Respond to CR.
// FREEBIE
8 years ago
Matthew Chen 0c7f183ac8 Respond to CR.
// FREEBIE
8 years ago
Matthew Chen a65d3b7c4e Add video-related views.
// FREEBIE
8 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
8 years ago
Michael Kirk 20e037ad8a bump build
// FREEBIE
8 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
8 years ago
Michael Kirk d3e6747499 Merge remote-tracking branch 'origin/master' into feature/webrtc 8 years ago
Michael Kirk 5856e351ae Respect WebRTC calling preference (#1640)
TODO: this is going to be weird when two parties are *just* enabling
webrtc for the first time. We might want to do something as drastic as
refetch contact information before completing the call.

// FREEBIE
8 years ago
Michael Kirk 1de5a51fea Pull latest translations
// FREEBIE
8 years ago
Michael Kirk 4e72ab92c8 Prevent session corruption by using a single serial queue for encrypt and decrypt
coordinate SignalProtocol encryption/decryption on a single serial
queue. Previously message sending encrypted on the sending thread, while
message receiving decrypted on the main thread.

// FREEBIE
8 years ago
Michael Kirk c4eecb24d7 bump release target
// FREEBIE
8 years ago
Michael Kirk a6029f2545 Merge remote-tracking branch 'origin/master' into feature/webrtc 8 years ago
Michael Kirk 6af933c17d Merge branch 'release/2.6.13' 8 years ago
Michael Kirk 333fb6c60f assert on main thread
// FREEBIE
8 years ago
Michael Kirk b2091431dc Fix retain cycle
// FREEBIE
8 years ago
Michael Kirk 87ed662116 Persist AudioService if CallViewController is dismissed
...in response to CR, move the AudioService off of the CallViewController

Adopt multiple observer pattern vs. a singular delegate. Doing so
required implementing some machinery to address the ARC (see:
Weak.swift)

// FREEBIE
8 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
8 years ago
Michael Kirk 4c23b5e23f Remove dependency on AppAudioManager
Implement speakerphone toggle directly. Previously we were using
AppAudioManager for several things, but this is that last lingering bit.
Much of the AppAudioManager code is based on RedPhone calling, so by
removing the dependency we pave the way to throw that code away.

// FREEBIE
8 years ago
Michael Kirk 4374e431a2 Respect silent switch in and out of app.
// FREEBIE
8 years ago
Michael Kirk a89bde933d Respect silent-switch pre-CallKit
8 Cases considered:

(Silent Switch toggled vs. Silent Switch not-toggled)
x (App in Foreground vs. App in Background)
x (CallKit vs. NonCallKit)

CallKit already does the "right thing"

// FREEBIE
8 years ago
Matthew Chen d4dbe7f44f Disable unused CallKit buttons.
// FREEBIE
8 years ago
Matthew Chen 229d95ecbf Respond to CR.
// FREEBIE
8 years ago
Michael Kirk d6f2fa92a6 remove negative notification
There isn't much the user can do in response to it, and the user will
get a subsequent "new message" notification when the fallback push
triggers.

// FREEBIE
8 years ago
Michael Kirk 907e122d62 Migrate legacy db stored logging preferences to NSUserDefaults
This is part of making sure we can log *before* the DB is initialized.

// FREEBIE
8 years ago
Michael Kirk 2355c74173 fixup condition
// FREEBIE
8 years ago
Michael Kirk 870fb960a2 Start logging earlier in app setup.
Because logging-preference was previously stored on the storageManager
this meant we couldn't possible log anything related to the init'ing the
storage manager.

TODO: migrate old logging preference to use the new NSUserDefaults
setting

// FREEBIE
8 years ago
Michael Kirk d9cfb38854 bump build
// FREEBIE
8 years ago
Michael Kirk 9516ab1106 Bail on startup if DB password is inaccessible
Most likely this would be  because the user hasn't unlocked their device
since last restart.

This behavior existed once before, but the startup ordering is pretty
delicate. So, we're now redundantly checking in SSK in case this
delicate startup logic gets mis-ordered again.

Also fixed the AppDelegate method to check for the proper
applicationState, since it will never be "active" in didFinishLaunching.

fixes https://github.com/WhisperSystems/Signal-iOS/issues/1627

// FREEBIE
8 years ago
Matthew Chen 9e739433c5 Start work on video.
// FREEBIE
8 years ago
Matthew Chen 698b914049 Elaborate logging in app delegate.
// FREEBIE
8 years ago
Michael Kirk 0e7083ed4e [SSK] remove Cuba from domain fronting
Current implementation is blocked in Cuba, plus there are reports of
Signal working w/o domain fronting anyway.

// FREEBIE
8 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
8 years ago
Michael Kirk ca218ebb64 update call signatures for test fakes
// FREEBIE
8 years ago
Michael Kirk 0797df19b9 Only update label on timer
The rest of the UI only changes on Call.state change.

// FREEBIE
8 years ago
Michael Kirk 0072ee3033 Ensure a stale peerConnectionClient doesn't call any methods on the CallService
Nil delegates when terminating call

// FREEBIE
8 years ago
Michael Kirk 32789bd960 Move RTCDataChannelDelegate to PeerConnectionClient
- minimizes CallService exposure to WebRTC

// FREEBIE
8 years ago
Michael Kirk 8998853aff Move RTCPeerConnectionDelegate to PeerConnectionClient
This makes sense as PeerConnectionClient is our interface to WebRTC

- Makes it easier to test PeerConnectionClient and CallService
- Allows us to shrink CallService class a bit (it's huge)

// FREEBIE
8 years ago
Michael Kirk bd65dc6ba7 Fallback TURN servers if we can't get them from the server for some reason
// FREEBIE
8 years ago
Matthew Chen 1898b9fa19 Merge branch 'charlesmchen/fixWebsocket' into feature/webrtc 8 years ago
Michael Kirk 415593b41f Bump version
// FREEBIE
8 years ago
Michael Kirk be0afaf972 bump build
// FREEBIE
8 years ago
Michael Kirk 1645663f88 pull latest translations
FIXES #1609

// FREEBIE
8 years ago
Matthew Chen ada6da9506 Fix merge.
The changes to SignalCall must have been lost as I tried to apply swift lint to them.

// FREEBIE
8 years ago
Matthew Chen a023d02ae2 Respond to CR.
// FREEBIE
8 years ago
Matthew Chen cb3f564446 Fix web socket issue.
// FREEBIE
8 years ago
Matthew Chen 1e80946a93 Add call duration to call view.
// FREEBIE
8 years ago
Matthew Chen 654bdb1a85 Add WebRTC setting.
// FREEBIE
8 years ago
Matthew Chen 071fc4ddc8 Improve buttons in call view.
// FREEBIE
8 years ago
Matthew Chen 8be987de1c Respond to CR.
// FREEBIE
8 years ago
Matthew Chen 19633a9f61 Respond to CR.
// FREEBIE
8 years ago
Matthew Chen 9df5cebfc3 Update the call view icons and refine the layout.
// FREEBIE
8 years ago
Matthew Chen 92eb2f6148 Update the call view icons and refine the layout.
// FREEBIE
8 years ago
Michael Kirk 7e715052d0 latest translations
// FREEBIE
8 years ago
Matthew Chen ee5682165d Respond to CR.
// FREEBIE
8 years ago
Matthew Chen 09c2e27e41 Respond to CR.
// FREEBIE
8 years ago
Matthew Chen c6de676018 Respond to CR.
// FREEBIE
8 years ago
Michael Kirk c4581dab21 Bump build
// FREEBIE
8 years ago
Matthew Chen 4a65a88512 Rework new call view.
// FREEBIE
8 years ago
Michael Kirk 469bff5734 Make call delegate weak
// FREEBIE
8 years ago
Michael Kirk 1ed39976ee make public protocol method implementations public
responding to CR

// FREEBIE
8 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
8 years ago
Michael Kirk fc6da05259 remove some dead code
Related to an earlier failed attempt of reconciling CallKit audio
management with WebRTC's.

// FREEBIE
8 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
8 years ago
Matthew Chen 98e087a47f Fix font lookup on iOS before 8.2.
// FREEBIE
8 years ago
Matthew Chen 740aa643be Add method to flush logs.
// FREEBIE
8 years ago
Michael Kirk c7449db289 remove stubbed audio manager implementation until it's clear what to do
with it.

// FREEBIE
8 years ago
Michael Kirk 9e248168b9 merge CallKitProviderDelegate into CallKitCallUIAdaptee
There was not a clear distinction in responsibilities and mostly the
Adaptee was just delegating to the CKProviderDelegate
8 years ago
Michael Kirk ce3780e44a Wip smashign providerdelgate into UIAdaptee 8 years ago
Michael Kirk 6eecef99ba Promise aware Message sender
As this could be used elsewhere, ideally it'd added to the actual class
definition, but MessageSender (SSK) doesn't use PromiseKit

// FREEBIE
8 years ago
Michael Kirk f9b44c8892 Added CallService documentation
// FREEBIE
8 years ago
Michael Kirk 602a5953f2 respect silence switch for incoming ringing
// FREEBIE
8 years ago
Michael Kirk 57ad7a2808 cleanup 8 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
8 years ago
Matthew Chen 6106326b34 Update to reflect changes in SSK https://github.com/WhisperSystems/SignalServiceKit/pull/85.
// FREEBIE
8 years ago
Thomas Guillet d7b27a4021 Refactor ContactsPicker to show a clean search bar
* Replace UITableviewController to UIViewController
* Create a custom xib file
8 years ago
Matthew Chen 2ce4d39f9e Respond to CR.
// FREEBIE
8 years ago
Matthew Chen d28b73cfa3 Add asserts to Signal iOS .pch. 8 years ago
Matthew Chen 2dac6c888a Update SignalServiceKit pod.
* Fetch messages when app becomes active.
8 years ago
Michael Kirk b89e1617a9 Bump release target
// FREEBIE
8 years ago
Michael Kirk 063163962c bump build
// FREEBIE
8 years ago
Michael Kirk 9f6b26a781 pull latest translations
// FREEBIE
8 years ago
Michael Kirk a636f0b6af Redphone works on ipv6 only network
// FREEBIE
8 years ago
Michael Kirk ce18be2288 pull latest translations
// FREEBIE
8 years ago
Michael Kirk 105e9ce6df Bump release
// FREEBIE
8 years ago
Michael Kirk 90daf60c56 Fix travis build
* Add generated Signal-Swift.h to test search header path. You must do
  this when testing an ObjC clas with swift dependencies (PushManager. in this case)
* Word on the street is that XCode8.2 is less flaky for running simulator tests

// FREEBIE
8 years ago
Michael Kirk ba4569f5bd delete unused code
//FREEBIE
8 years ago
Michael Kirk ddba843d44 Censorship circumvention in Egypt and UAE
* domain fronting
* non-websocket message fetching

// FREEBIE
8 years ago
Michael Kirk bcd371b96c Bump build
// FREEBIE
8 years ago
Michael Kirk 94d37d9c55 Warn user about re-registering existing signal number
* show better errors if it *does* happen.
  If someone tries to send from their old device, they'll see a
  depressing, but sensible warning message.
* new translations

// FREEBIE
8 years ago
Michael Kirk 1b50f1d842 Bump version
// FREEBIE
8 years ago