A couple of weird things left after the CallInitiator refactor:
removed unused segue
confusingly, call direction was *always* incoming, even for outgoing
calls. But we weren't using it anyway.
// FREEBIE
Previous logic assumed "VoiceChat" mode, but when the ringer goes off,
we set "SoloAmbient" which is incompatible with that mode, causing
assertion failure.
// FREEBIE
* Add "search by phone number" to "no contacts" mode.
* Coordinate "invite flow", "invite by SMS" and "new conversation with non-contact" to ensure only one (at most) is shown.
* Show "new conversation with non-contact" IFF phone number is known to correspond to a signal account.
// FREEBIE
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
* 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
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
- 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
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
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
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
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
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
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
...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
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 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
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
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
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
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
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
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
In the process, extracted the CallDelegate to allow the
CAllViewController to observe useful call state properties (call.state
and call.isMuted)
// FREEBIE
* 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
* 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
* 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
The previous launch screen was initially built on iphone5, but we never
scaled the logo to have the same proportions on iphone6 and larger
screens. Now it's scaled proportional to the screen width.
// FREEBIE
The broken code addressed in 8211d4584f
was duplicated a couple of places. This commit ferrets out the rest of
them and centralizes the logic in the ContactsManager.
// FREEBIE
number
The invite contact picker was rendering the "#" avatar for contacts who
had a name, but no phone number.
In some ways this approach is dumber. But since we have "surprising"
logic to set the contacts firstName to a phone number or maybe a company
name when contacts are built from ABContacts, this approach is more on
the level with the existing assumptions of what could be in that field
(which is to say, pretty much anything).
// FREEBIE
For consistency with the Android and Desktop client behavior.
* Show a placeholder avatar when no image, initials (#1512)
If all we know about the user is their phone number, their avatar image
is rendered as a placeholder. Previously, it would render the first few
characters of their phone number as if they were initials (eg. "+")
* Rename, extend OWSContactsManager methods (#1512)
Rename from: nameStringForPhoneIdentifier
to: displayNameForPhoneIdentifier
Also, add:
- (BOOL)nameExistsForPhoneIdentifier:(NSString *)identifier;
Which reports whether there's any "name" for a contact.
* Remove unused typedefs
These aren't used in the project anymore, and they were causing
compiling warnings due to a lack of nullability indication.
* Resolve some OWSContactsManager nullability warnings
Did a pass through all of the existing nullability warnings in
OWSContactsManager. Tried to pick descriptors that best reflected the
behavior of the methods.
// FREEBIE
- Update translations
- Updated transifex scripts to convert appropriately
- Run script from any dir
- Check that target directories exist
- We're currently not pulling any strings from JSQMVC
UTF-8 is preferred since we can see diffs in GH and have sane merges.
// FREEBIE
Preferred to the system contact picker because:
1. removes "group" clutter from header, unlikely to be used much.
2. can select while searching
3. fixes unified contact problem where e.g.
If only one of your contact has a phone number, they appear disabled
when choosing to invite via messaging, even though the other linked
contact *does* have a phone number.
4. label users w/o email so it's clearer why they can't be selected
Also:
* Twitter share-image was too tall
// FREEBIE
* Spruce up compose contact-picker
- Fix random sorting for contacts missing first or last name
- Add Avatar to contact picker
- de-dupe contacts
Better copy for INVALID_MESSAGE error.
// FREEBIE
* Automatically adjust message bubble text size on dynamic text changes.
- Addresses part of #1453.
* Renamed dynamic text notification handler method.
Only send a message if the local number is part of the group
* Fix error on empty group #1449
* Fix an unlogged issue about notification sent to group members even is the local user already quit the group
There was a bug in voiceover mode. When reading messages, Voiceover
would read out "message author: message content" for each chat bubble,
but the message author was always the name of the chat. So if it was
a contact chat, every message would be read as if from the other party,
and if it was a group chat, every message would be from the title of
the group.
This patch looks up the display name for the given signal id so
Voiceover reads the correct name for each message. It will read "Me" if
the message is outgoing.