Commit Graph

7232 Commits

Author SHA1 Message Date
Michelle Linington
91aaffe16b Lint 2022-01-31 11:00:13 -08:00
Michelle Linington
06a83d065c Improves performance of launch jobs
Randall hit an issue where his device would take a few seconds to start
up. His logs indicate that his device is spending time running
LaunchJobs.

The first change here is to make sure we explicitly set the launch job
work at an ultra-high priority. This is okay, since we don't actually
present UI until after we finish these jobs. Running this work at
UserInteractive is appropriate since it quite literally prevents the
user from interacting with the app. There's also no other time-sensitive
UI work we need to be doing (like running animations) that we could be
contending with.

The second change is to add a bit more logging that allows us to monitor
the amount of work these jobs are doing. This will allow us to see if
these jobs are performing an excessive amount of work.

Finally, I moved these LaunchJobs to Swift. Mostly because the ObjC
implementations were block based. The additional code was going to
indent things further and our linter aggressiely indents blocks to begin
with. Moving this to Swift is much more readable.
2022-01-31 11:00:13 -08:00
Jordan Rose
2c6dc927d8 SSK: Prefer SignalServiceAddress(uuid:phoneNumber:) if we have a UUID
...rather than stringifying the UUID just to parse it back. For
-[TSAccountManager localAddress] in particular the savings are
surprisingly substantial because the UUID string went into an
autorelease pool.
2022-01-28 18:02:31 -08:00
Jordan Rose
fe5788a089 Process one page of group updates at a time
...instead of parsing them all from the server and *then* processing
them (85200228cf). This should keep from blowing out an arbitrary
amount of RAM in pathological cases.
2022-01-28 15:27:34 -08:00
Michelle Linington
b6820580c4 Merge branch 'release/5.27.0' 2022-01-27 16:15:44 -08:00
Michelle Linington
f2350eb9aa "Feature flags for .qa." 2022-01-27 16:12:57 -08:00
Michelle Linington
8def7021bf "Feature flags for .beta." 2022-01-27 16:12:47 -08:00
Nora Trapp
41dd7a14d9 Add support for IASv4 enclaves 2022-01-27 15:58:47 -08:00
Nora Trapp
58bf1d1326 Mark registration lock as disabled locally when PIN is disabled 2022-01-27 15:22:38 -08:00
Nora Trapp
e27680b57a Allow the introducingPins megaphone to be completed multiple times 2022-01-27 15:22:38 -08:00
Michelle Linington
f29d37f381 Merge branch 'release/5.27.0' 2022-01-26 12:21:38 -08:00
Michelle Linington
182c233f65 "Feature flags for .qa." 2022-01-26 12:02:03 -08:00
Michelle Linington
4e3c4851f1 "Feature flags for .beta." 2022-01-26 12:01:55 -08:00
Ehren Kret
41a289946b Add support for new certificate authority
TextSecure CA expires in ~1 year; time for new one.
2022-01-26 12:59:45 -06:00
Nora Trapp
dc788cd347 Ignore messages with StoryContext 2022-01-26 10:28:52 -08:00
Jordan Rose
a31100f0f5 Fix copyrights 2022-01-26 09:50:56 -08:00
Jordan Rose
1d9ea00b9e Remove unused helper types from SMKSecretSessionCipher 2022-01-26 09:50:56 -08:00
Jordan Rose
31e87ae986 Eliminate SMKAddress in favor of SignalServiceAddress 2022-01-26 09:50:56 -08:00
Jordan Rose
d7a05f54d2 Remove custom sender certificate validation
Generate valid sender certificates in tests, removing the need to
customize validation or build certificate data by hand.

While here, remove "throwswrapped" from some APIs that no longer wrap
ObjC-throwing methods.
2022-01-26 09:50:56 -08:00
Jordan Rose
01518551eb Import SignalMetadataKit wholesale into SignalServiceKit
The only modifications are those necessary to build as part of SSK.
The follow-up commits will clean that up a bit.
2022-01-26 09:50:55 -08:00
Martin Böttcher
db39ea30bb pinning an archived conversation automatically moves it into inbox again
(cherry picked from commit f25aa47805)
2022-01-26 09:59:20 +01:00
Martin Böttcher
f25aa47805 pinning an archived conversation automatically moves it into inbox again 2022-01-26 09:33:51 +01:00
Jordan Rose
398331f512 Don't apply "preferred" skin tones to the default set of reactions
This is a change from past behavior in order to standardize on
explicit customization being the only way to change the default set of
reactions.
2022-01-25 17:33:58 -08:00
Jordan Rose
cc0ad75524 Fix handling of customized emoji reactions with skin tone modifiers
iOS keeps track of the last-used skin tone modifiers for every
reaction emoji you use. Before reactions were customizable, this
applied to the default set of reactions as well: if you went into the
full picker to select a light-skinned thumbs-up, the short picker
would also have a light-skinned thumbs-up from then on, and if you
changed to dark skin or back to "default" (yellow in our font), the
short picker would be updated again.

However, this is *not* how the customized reactions sync'd through
storage service work; those have skin tone modifiers "baked in", so to
speak. These reactions weren't being treated as valid because they
weren't "base" emoji that could have a skin tone applied to them.

This PR changes things so that there are now two possible states:

- You have never customized your reactions on any platform. In this
  case, skin tones continue to follow your most recent choice for that
  emoji from the full picker.

- You *have* customized your reactions, in which case it's assumed
  they already have the skin tones you want. This even allows you to
  have multiple reactions in your default set with the same base emoji
  but different skin tones.

Further commits will remove the special nature of the first state.
2022-01-25 17:33:58 -08:00
Michelle Linington
361c3ece79 "Feature flags for .qa." 2022-01-25 17:08:13 -08:00
Michelle Linington
f00de23cb0 "Feature flags for .beta." 2022-01-25 17:07:55 -08:00
Jordan Rose
076a976961 Remove now-unnecessary 'version' parameters from HKDF calls
SignalClient used to support a non-standard version of HKDF as
"version 2" (numbered for an old version of the Signal protocol), and
the standard one as "version 3". Now only the standard version is
supported, so the parameter is unnecessary.
2022-01-25 17:00:17 -08:00
Michelle Linington
eaf800d0e7 Merge branch 'release/5.27.0' 2022-01-24 17:33:00 -08:00
Michelle Linington
af43912d47 "Feature flags for .qa." 2022-01-24 17:31:58 -08:00
Michelle Linington
9a38979c67 "Feature flags for .beta." 2022-01-24 17:31:52 -08:00
Jordan Rose
fc2d02ef99 Improve logging 2022-01-24 17:10:37 -08:00
Nora Trapp
a2f51dc4a3 Cleanup old feature flags 2022-01-24 10:53:55 -08:00
Ehren Kret
c7482d373f Remove pre-mature optimization
Optimizing for non-downloaded stickers by reading the entire table set
of IDs into memory first then subsequently reading each row one-by-one
seems less than ideal.
2022-01-24 12:47:21 -06:00
Ehren Kret
c8cbd0bca0 Regenerate SDS extensions 2022-01-24 12:47:21 -06:00
Nora Trapp
c005afd79b Adjust megaphone priority and remove old megaphones 2022-01-24 10:42:34 -08:00
Michelle Linington
8ecb6afc66 "Feature flags for .qa." 2022-01-21 10:34:35 -08:00
Michelle Linington
5ba11da60b "Feature flags for .beta." 2022-01-21 10:34:23 -08:00
Nora Trapp
513a37892e Tweak change phone number feature flags 2022-01-21 10:16:35 -08:00
Michelle Linington
895ca97c47 "Feature flags for .qa." 2022-01-20 23:26:24 -08:00
Michelle Linington
8b17d4c8da "Feature flags for .beta." 2022-01-20 23:26:14 -08:00
Michelle Linington
ab8b1a8dbc "Feature flags for .qa." 2022-01-20 18:13:10 -08:00
Michelle Linington
bbf6e7298a "Feature flags for .beta." 2022-01-20 18:12:46 -08:00
Jordan Rose
904bb36d7f Turn group data caches back on in the NSE
Without the GroupV2Params caches, processing multiple large group
updates is extremely wasteful, decrypting the same profile keys and
UUIDs over and over again. The size of these caches has also been
*increased* to match the group size limit, or else there's no benefit
for large groups.

Other LRUCache instances are still off by default in the NSE by virtue
of the "NSE max" defaulting to 0.
2022-01-20 16:49:37 -08:00
Jordan Rose
58a688ad61 Lazily deserialize individual group changes
If there are several group changes being returned at once,
deserializing all of them up front can lead to excessive memory use,
especially for very large groups. This commit switches to
deserializing each change as it is used, which doubles the amount of
CPU work (because we loop through the changes twice) in exchange for
only ever having one Change object graph in memory at a time. It does
also mean we can get a protobuf deserialization error a bit later in
the process if the data is ever corrupted, but that shouldn't cause
additional issues at these particular call sites.
2022-01-20 12:00:50 -08:00
Nora Trapp
674d3b1be7 Merge branch 'release/5.26.10' 2022-01-19 18:29:13 -08:00
Nora Trapp
0402c12a26 "Feature flags for .beta." 2022-01-19 18:26:24 -08:00
Nora Trapp
fca3ab04a8 "Feature flags for .production." 2022-01-19 18:26:04 -08:00
Nora Trapp
2767e201a9 Ensure we read sourceUuid from incoming messages via REST 2022-01-19 18:25:56 -08:00
Jordan Rose
052319de65 SSK: Put spam challenge loading onto the spam challenge work queue
Previously fetching outstanding challenges from the database was done
synchronously when the app was done loading, but using them was always
done from the work queue. Nothing synchronized those two, though, so
TSan flagged it as a data race.
2022-01-13 11:12:35 -08:00
Martin Böttcher
9ce447de57
refactored async loading of avatar images in HomeView (#3886)
* refactored async loading of avatar images in HomeView

* async loading avatars does not use extra DispatchWorkItems anymore

* minor code changes, added comments
2022-01-13 09:13:12 +01:00