Commit Graph

2302 Commits

Author SHA1 Message Date
Greyson Parrelli
860047c2d3 Remove CornerMaskingView. 2018-07-20 14:24:04 -07:00
Greyson Parrelli
d0eaee60e9 Add additional safeguards for picking an expiration timer frame.
Fixes #8010
2018-07-20 14:08:58 -07:00
Greyson Parrelli
d303a88803 Fix quote dismiss button not showing up.
Fixes #8006
2018-07-20 14:03:03 -07:00
Greyson Parrelli
8f551c8b32 Fix various redesign issues with Android 4.x.
In particular, there were many issues with drawing corners.
Unfortunately, there's no pretty way to get masking working on every
Android version, so we have to switch back to using custom backgrounds
and then using multiple masking methods depending on Android version.

Also, I had to remove attr references in drawables. They crash on 4.x.
2018-07-18 16:53:36 -07:00
Jonathan Fung
85d963047e Adding a long press icon description for the Search icon
Fixes #7836
2018-07-18 09:04:42 -07:00
floesche
df9833472f Add z5 compact (E5823) to AEC blacklist
Following fixes for other models to reduce echo on callee side during Signal call. 

The problem has been reported for this model for example in #6241
2018-07-18 08:53:27 -07:00
Greyson Parrelli
bf692e8da3 Throttle background contact syncs to once every 6 hours.
Unfortunately, there's apps out there that trigger contact changes
very frequently. Because we listen to the system for contact
changes to tell us when to sync, that could result in us sending
an abundance of contact syncs to linked desktop instances.

This throttles contact sync requests using the following methodology:

- By default, throttle contact syncs to 6 hrs while the app is
  backgrounded.
- If a sync is throttled in the background, we set a dirty flag and
  will execute the sync the next time the app is foregrounded.
- Syncs explicitly requested by desktop are never throttled.
2018-07-17 12:06:50 -07:00
Greyson Parrelli
8579c30909 Styling improvements and code cleanup. 2018-07-17 12:06:42 -07:00
Greyson Parrelli
845fcf0864 Remove ability to set group conversation colors (for now). 2018-07-17 09:54:13 -07:00
Greyson Parrelli
24b062d8dd Improve the look of message bubbles. 2018-07-17 09:53:52 -07:00
Greyson Parrelli
b02dda405c Use NetworkBackoffRequirement for group messages. 2018-07-12 10:59:10 -07:00
Moxie Marlinspike
bc60cba2b8 Fix default SMS app intent >= N
Fixes #7964
2018-07-10 10:14:35 -07:00
Greyson Parrelli
84e2fcad54 Update UI of toggling shared contact photo. 2018-07-05 10:05:54 -07:00
Greyson Parrelli
6ce8516b93 Make contact photos optional when sharing contacts.
Previously, if you had a contact photo for a user, we'd always send it
Now you can choose whether or not it is sent.
2018-07-03 17:16:50 -07:00
Greyson Parrelli
67407ec667 Hard-code migration for full-text search. 2018-07-02 18:10:11 -07:00
b0m0x
2290549349 add Mi A1 to hardware AEC blacklist
See #7635
2018-07-02 17:45:55 -07:00
Greyson Parrelli
bf07048d7b Use earlier read timestamp when syncing read status with desktop.
Previously, we'd always use the value desktop gave us. However, if we
have an earlier read time locally, we want to use that instead.
2018-07-02 17:39:10 -07:00
Greyson Parrelli
3134837d56 Remove plaintext backup import option.
We have our own secure backup solution built into the app now.
No need to support plaintext backups.
2018-07-02 17:11:13 -07:00
Greyson Parrelli
c7066c0796 Cast to MmsMessageRecord in ConversationFragment#handleForwardMessage.
Was causing a crash for MMS messages.

Fixes #7951
2018-07-02 08:56:11 -07:00
Greyson Parrelli
18756aedf6 Remove the ability to save backups to the external SD card.
The directory we were previously saving backups to on the external SD
card is actually deleted upon app uninstall and/or clearing the app's
data. There's also no reliable way to write to the root of an external
SD card (that isn't comically inconvenient), so for now it's safer if we
just move back to getting the regular 'ol standard external storage
directory (which is likely internal storage, despite its name).

Fixes #7845
2018-06-29 14:10:45 -07:00
Greyson Parrelli
290b184491 Enable shared contact sending. 2018-06-29 11:08:13 -07:00
Greyson Parrelli
0d386d3c14 Fix progress bar showing for self-sends.
For self-sends, we were never marking attachments as uploaded. I made is
so that happens now, but to prevent it for showing for already-sent
messages, we also don't show controls for self-send conversations.
2018-06-28 12:07:23 -07:00
Greyson Parrelli
fd6d947df3 Fix ClassCastException in ThreadDatabase.
I casted too deep. Forgot about NotificationMmsMessageRecord.
2018-06-27 09:43:02 -07:00
Greyson Parrelli
381547d668 Fix crash with formatting emails in recipient settings.
Fixes #7868
2018-06-22 13:24:36 -07:00
Greyson Parrelli
f72f75ee61 Show a link for privacy policy. 2018-06-22 13:09:43 -07:00
Greyson Parrelli
b39a7ac939 Add expiration time to group update requests. 2018-06-22 11:29:16 -07:00
Greyson Parrelli
b5d4cac90a Send/receive expiration times for group updates.
This particularly helps with the bug where people who were newly added
to a group wouldn't receive an expiration timer until the first message
was sent.
2018-06-22 11:01:55 -07:00
Greyson Parrelli
dae655fd01 Fix conversation snippet for contact shares.
Previously, contact shares would be displayed as "Media Message". Now
it'll show the same as it does in a notification, namely
"{contact-emoji} {contact-name}".
2018-06-22 10:59:53 -07:00
Greyson Parrelli
933be54035 Update scheduling of ServiceOutageDetectionJob.
Previously, we were running this job in PushSendJob#onCanceled().
However, with the new retry logic, this won't happen for 24 hours.

Instead, we now schedule the job in PushSendJob#onRetry().
2018-06-22 10:59:53 -07:00
2-4601
f1d8fd8838 Add devices to hardware AEC blacklist
- Moto G4
- Nokia 5 (TA-1053)

Alleviates #7635
2018-06-22 10:59:53 -07:00
Greyson Parrelli
a50edc3d25 Keep retrying message sends for 24 hours.
Previously, we retried based on a count. Now we've added the ability to
keep retrying for a specified time, using exponential backoff to
throttle attempts.
2018-06-22 10:59:53 -07:00
Greyson Parrelli
62c42a3513 Fix disappearing message corner case.
We never properly registered the ExpirationListener, meaning we were
relying on the wait-notify loop of ExpirationManager to delete things.
This normally works, but fails when your phone goes to sleep. So I
properly registered the receiver, and then added a failsafe to re-run
the ExpirationManager if we're about to render an expired message.

Fixes #7906
2018-06-22 10:59:53 -07:00
Greyson Parrelli
42f1baaf61 Imported JobManager as a source dependency.
We have to make some changes, and it's gotten to the point where
maintaining it as a separate library is more hassle than it's worth,
especially with Google releasing WorkManager as the preferred job
scheduling library.
2018-06-22 10:59:53 -07:00
Greyson Parrelli
5f99470226 Allow searching for words with apostrophes.
Previously, because apostrophes were 'banned' characters, searching for
them wouldn't work. That meant you couldn't find words like "I'm". Now
we just replace the apostrophe with a space and things "just work"
because of the nature of SQLite tokenization and prefix queries.
2018-06-22 10:59:53 -07:00
Greyson Parrelli
afec9e8cb0 Improve highlighting in search results.
Previously, we didn't support highlighting search results that had
tokens in the middle of the matches, which is a possibility with FTS.
Now we do more robust highlighting, as well as highlight matches in
phone numbers.
2018-06-22 10:59:53 -07:00
Greyson Parrelli
89fd7dda23 Break FTS queries into multiple prefix queries.
Previously, we made each full-text search query a single prefix query.
That means that the query "do c" would turn into "do c*". That means it
would match "do cat" but not "dog cat".

Now, we make each token a prefix query. So "do c" would turn into
"do* c*". That means it would match both "do cat" and "dog cat".
2018-06-22 10:59:53 -07:00
Greyson Parrelli
3563efc7de Update search query results when messages disappear.
Previously, if a message disappeared while looking at it in the search
results, it'd still stick around. Now they'll disappear from the results
in real-time.
2018-06-22 10:59:53 -07:00
Greyson Parrelli
ea4ac9db30 Fixed issue where self-sends didn't auto download.
1) There was an issue where we wouldn't auto-download group syncs.
2) There was another issue where we didn't show the download controls
   for messages you sent yourself.

Fixed #7920
2018-06-22 10:37:07 -07:00
Greyson Parrelli
71a34dac5f Fix backup/import issue with expiring messages.
There was an issue where we were backing up group receipts and attachments
that were for expiring messages (which are already excluded from the backup).

This commit excludes these items from the backup, and for backups made
before this change, this commit also deletes these invalid entries at
the end of the restore process.

We also do a little database migration to cleanup any bad state that may
have been imported in the past.
2018-06-21 19:07:27 -07:00
Greyson Parrelli
61b2da9c8a Fix NPE during busy call. 2018-06-21 18:47:14 -07:00
Greyson Parrelli
3a85c966d0 Fix false-positive outage detection.
Turns out that there's some weird quasi-state when you come out of
airplane mode, that if you do an InetAdress lookup, it returns some
weird IPv6-looking garbage address. Going to retry in that scenario
instead of assuming an outage.
2018-06-20 13:24:33 -07:00
Greyson Parrelli
fe4ce88439 Revert "Upgrade SQLCipher to respect a max window size."
This reverts commit dace93abb3.
2018-06-18 16:24:35 -07:00
Greyson Parrelli
542e962be9 Fixed crash when ScribbleView failed to save.
Previously, if an operation failed, we set the result to "null".
However, this was a mistake. Setting the result at all assumes success.
Instead, we need to set an exception so the ListenableFuture knows that
the operation failed.
2018-06-18 14:33:44 -07:00
Greyson Parrelli
2c17b54ef9 Show a banner in the event of a service outage.
We will now determine if there has been a service outage and render a
banner at the top of the conversation list if we detect that there has
been one.
2018-06-18 14:32:45 -07:00
Greyson Parrelli
0999359454 Improve the image editor.
A variety of improvements to the image editor, such as:

- New, fullscreen styling
- Smoother lines
- Better text and sticker handling
- Improved color picker with a history pallette
- New highlighter tool
2018-06-18 14:32:45 -07:00
Greyson Parrelli
dace93abb3 Upgrade SQLCipher to respect a max window size.
Previously, SQLCipher's memory usage would grow indefinitely, up until
it hit the end of the cursor. We've now switched to a release where the
memory  used by the cursor can be bounded.
2018-06-18 14:32:45 -07:00
Greyson Parrelli
df2c5d38b0 Don't notify new users if there is a pending SQLCipher migration.
If a user is upgrading to use the SQLCipher database (which happened
back in 4.16, so this only applies to relatively dormant users who are
just getting back into the app) and received a new "user X joind signal"
message, then it could screw up the migration. So we're just dropping
these notifications that happen in this narrow window.
2018-06-18 14:32:45 -07:00
Greyson Parrelli
79857b98b3 Fix bug with quoted reply notifications. 2018-06-18 14:08:47 -07:00
Greyson Parrelli
626e6930a5 Fix search header rendering after rotation.
The sticky header cache was keeping views across rotations, causing them
to render incorrectly afterwards. I added a method to invalidate the
header layouts after rotation.

Fixes #7890.
2018-06-14 10:50:21 -07:00
Greyson Parrelli
44f5cc9070 Annotate methods in AttachmentUtil as @WorkerThread. 2018-06-11 11:08:25 -07:00