Commit Graph

2402 Commits

Author SHA1 Message Date
Greyson Parrelli
24e82abf80 Don't report contact discovery accuracy if it encountered an error.
Otherwise we're double-reporting. Also made the sanitize method more
accurate.
2018-10-02 09:16:37 -07:00
Greyson Parrelli
cfa13867e5 Allow null for profileAvatar in RetrieveProfileAvatarJob. 2018-10-02 08:43:18 -07:00
Greyson Parrelli
34770a2333 Fixed Camera capture crash on API <= 19.
On older versions of Android, TextureView#getBitmap() needs to be called
on the main thread. On mid range phones, this is ~50ms. Normally that'd
be bad, but the UI isn't doing anything at that point anyway.

Fixes #8232
2018-10-01 23:53:33 -07:00
Greyson Parrelli
2c5fa155ae Fix re-enabling tab switching in MediaOverview.
We were being inconsistent in how we were handling exiting multiselect,
and it wasn't behaving properly when you left by clicking the 'x'. Now
it's all handled centrally.

Fixes #8234
2018-10-01 23:38:07 -07:00
Greyson Parrelli
12afdad291 Log Job retryable exceptions. 2018-10-01 16:14:45 -07:00
Greyson Parrelli
2f530dc970 Remove CameraView usage of JobManager.
WorkManager flat-out can't handle anonymous implementations of Worker
classes due to it using reflection to instantiate them.
2018-10-01 12:12:50 -07:00
Greyson Parrelli
87e6aa48bb Schedule jobs with WorkManager.
Should help solve most of our pressing targetSdk=26 migration issues.
2018-10-01 12:12:50 -07:00
Greyson Parrelli
d10a44f8eb Suppress some noisy logs. 2018-10-01 12:12:50 -07:00
Greyson Parrelli
6359961a82 Ensure numbers are properly formatted before giving them to contact discovery service.
We were sending "Unknown" addresses, which would cause the service to
choke.
2018-10-01 12:12:12 -07:00
Greyson Parrelli
616912d85f Prefer local state in dial click listener. 2018-09-27 11:45:56 -07:00
Greyson Parrelli
bd38b96095 Long-press timestamps in message details to copy. 2018-09-27 11:34:43 -07:00
Greyson Parrelli
12d9d7741b Clean up batch saving.
- Post a better string for when batch saving completes successfully
- Exit multi-select after saving
2018-09-27 10:35:56 -07:00
FeuRenard
91a119393c Allow batch saving in media overview 2018-09-27 10:35:56 -07:00
FeuRenard
c82afd8944 Allow selecting all media in overview 2018-09-27 10:35:56 -07:00
Greyson Parrelli
84c71fce16 Disable tab switching in media overview during multiselect.
Multiselect only applies to items in the "media" tab, so people
shouldn't be able to switch tabs during multiselect.
2018-09-27 10:35:56 -07:00
Greyson Parrelli
a0ab252bc9 Add preliminary contact discovery service support. 2018-09-27 10:35:56 -07:00
Greyson Parrelli
08ace15f95 Implemented new camera capture flow.
A new, fullscreen camera capture flow that easily allows you to capture
and edit a photo before sending it. Replaces the current half-screen
camera button.
2018-09-27 10:35:56 -07:00
Greyson Parrelli
e9a38bab1e Turned SingleUseBlobProvider into MemoryBlobProvider.
Keep the single-use behavior, but allow the creation of multi-use memory
blobs that can be deleted when we're done with them. Will help out with
having URI's for temporary images during the camera capture flow.
2018-09-27 10:35:56 -07:00
Greyson Parrelli
e63773e5c8 Added OrderEnforcer class to schedule ordered tasks. 2018-09-27 10:35:56 -07:00
Greyson Parrelli
bcebf58b76 Added a new Stopwatch class to easily log timings. 2018-09-27 10:35:56 -07:00
Greyson Parrelli
6eb8693546 Don't block messages from unknown groups.
We were incorrectly considering unknown groups to have been "left".
2018-09-25 10:00:14 -07:00
Greyson Parrelli
11127c0d97 Clear external cache upon upgrade. 2018-09-19 16:41:51 -07:00
Greyson Parrelli
45c4eafbd7 Add the ability to block groups.
This also fixes the situation where we block group-leave messages,
preventing blocked contacts from leaving groups.

Fixes #7970

Also, this forced us to upgrade libsignal-service, which fixes the
websocket timeout issues. Thanks to @dpapavas!

Fixes #6644
2018-09-18 15:26:50 -07:00
Greyson Parrelli
741b775d3e Ensure external camera blob is deleted. 2018-09-17 20:29:21 -07:00
Greyson Parrelli
e09c99102e Clear Glide disk cache after image deletion. 2018-09-17 19:17:36 -07:00
Greyson Parrelli
1d4020ffc6 Disable forwarding for shared contacts.
Forwarding of shared contacts currently just creates an empty draft.
You can't preview a shared contact before you send, which would make the
forwarding flow inconsistent across media types. So it's easier to just
hide it for now.

Fixes #8195
2018-09-16 22:50:59 -07:00
Greyson Parrelli
5d11e321a8 Fix setting global notification sound to 'None'.
Fixes #8206
2018-09-16 22:29:55 -07:00
Greyson Parrelli
9dd3e50ebd Don't set subscriptionId for quick-reply push messages.
This could cause us to think push messages were actually sent with
a SIM. We also now prevent rendering SIM info on push messages in
the conversation view.

Fixes #8176
2018-09-08 10:08:22 -07:00
Greyson Parrelli
440ad70d79 Allow submitting a debug log during registration. 2018-09-08 07:48:20 -07:00
Greyson Parrelli
a1b2887bf3 Fixed off-by-one crash when navigating to message from FTS.
Related to #8145
2018-09-08 07:48:20 -07:00
Greyson Parrelli
db9bfb4b2f Update ExoPlayer to 2.8.4 2018-09-08 07:48:20 -07:00
Greyson Parrelli
c3bdc48ee3 Create placeholder ContentProviders for database observations.
Required for the API 26 migration.

See https://developer.android.com/about/versions/oreo/android-8.0-changes#ccn
2018-09-08 07:48:20 -07:00
Greyson Parrelli
7c5e1db6a2 Fix NPE in MultiDeviceContactUpdateJob.
Fixes #8180
2018-09-07 17:52:50 -07:00
Greyson Parrelli
82c0ea792a Fix animation crash.
Shoutout to @bomba1990 for fixing this around the same time as me :)

Fixes #8182
2018-09-07 17:52:50 -07:00
Greyson Parrelli
70eecb754e Address bugs in notification channel backup restore. 2018-09-07 17:49:15 -07:00
Greyson Parrelli
ad036b0d6a Fix backup restore issues from restoring newer Signal backups.
Fixes #8184
2018-09-07 16:08:45 -07:00
Greyson Parrelli
15b4517e35 Prevent restoring newer backups into older versions of Signal.
Relates to #8184
2018-09-07 15:54:38 -07:00
Greyson Parrelli
8d43fb850d Make group notifications use the latest sender's ringtone. 2018-09-04 18:10:47 -07:00
Greyson Parrelli
11d34512a0 Fix double notifications in O+. 2018-09-04 18:10:42 -07:00
Greyson Parrelli
73b18fc1dd Fix NotificationChannel backup import.
We were recreating the channels before the database upgrade. We
have to do it after.

Fixes #8174
2018-09-04 10:57:33 -07:00
Greyson Parrelli
d9ba6962c7 Fixed NPE during channel update. 2018-09-03 17:48:55 -07:00
Greyson Parrelli
3da1a3e270 Restore notification channels after backup. 2018-08-31 12:00:46 -07:00
Greyson Parrelli
e840dc6687 Move notification preferences back in-app for O+.
Fixes #8147
2018-08-31 11:10:54 -07:00
Greyson Parrelli
5d91a94252 Fix shortcut images being too large.
We were hitting the transaction limit size. This change scales down
shortcut icons to be at most 300x300, which comes out to ~360kb, which
should be safely under the limit of 1mb.

Fixes #8139
2018-08-25 10:40:58 -07:00
Greyson Parrelli
ab58eab9f4 Fix potential crash with recipient preferences. 2018-08-24 12:00:02 -07:00
Greyson Parrelli
cedab7f504 Fix migration of group names when creating Notification Channels. 2018-08-22 14:19:37 -07:00
Greyson Parrelli
ca2efcac8a Added safeguards during NotificationChannel creation.
We were getting an IllegalArgumentException during channel creation on
some Samsung phones. Stack trace didn't give me much more than that, so
just adding in some additional safeguards that make sense based on
reading AOSP.
2018-08-22 13:19:59 -07:00
Greyson Parrelli
f1efe2b589 Use correct in-thread message tone on O+.
We manually play the ringtone when in-thread notifications are enabled,
but we weren't using the sound specified by the channel in the system
settings. This fixes that problem by reading the NotificationChannel
setting.
2018-08-22 11:58:41 -07:00
Greyson Parrelli
e1f8e87327 Fix log submission OOM, improve log scrolling.
We were getting a TransactionTooLargeException when giving an
EditText a very large (1.5MB+) text block. This has been resolved
by switching to a RecyclerView to show the text line-by-line. As a
side-effect, this improves scroll performance on lower-end devices.

Also, I added a button to jump to the bottom of the log because I
really wanted one :)

Fixes #8124
2018-08-20 01:24:36 -07:00
Greyson Parrelli
88d94cad92 Substantially improve Scrubber performance.
Previously, we were making a new copy of the entire source string after
every scrubbed substitution. In the case of our new, larger log files,
this was very slow. It's been changed so we only ever create one new
copy.

In practice, on a Moto E (2014), scrubbing a 1.5MB log went from
>4000ms to ~100ms.
2018-08-19 23:19:08 -07:00