Commit Graph

2251 Commits

Author SHA1 Message Date
Greyson Parrelli
e6c16cf28d Allow editing of contact names.
Took care to properly format CJK names.
2018-05-21 15:45:22 -04:00
Greyson Parrelli
54dbffaf30 Added ability to share contacts.
The "contact" option in the attachments tray now brings you through an
optimized contact sharing flow, allowing you to select specific fields
to share. The contact is then presented as a special message type,
allowing you to interact with the card to add the contact to your system
contacts, invite them to signal, initiate a signal message, etc.
2018-05-21 15:45:22 -04:00
Greyson Parrelli
17dbdbd0a9 Handle quote position task finishing after fragment detaches.
There's a chance that the AsyncTask that retrieves a quoted message's
position could finish after the fragment is detached, which would cause
a crash. I've changed it so if this case occurs, the result is ignored.

Also, I noticed that when searching the message table, if a quote can't
be found, we'd end up traversing the entire table. To prevent this from
taking forever on large message tables, I've limited it to searchin only
what is currently present in the adapter.

Fixes #7756
2018-05-21 15:45:22 -04:00
Greyson Parrelli
ca8fecea9c Clean up camera flipping, handle having missing cameras.
Did a refactor to better organize the camera flipping code. Also, I
wanted to make sure we handle the cases where the user doesn't have two
cameras (or no cameras, for that matter). In these cases, we just don't
show the appropriate buttons.
2018-05-21 15:45:22 -04:00
Niklas Hambüchen
f1c79eaebf Add button to flip camera (front vs rear). Fixes #6279 2018-05-21 15:45:22 -04:00
Moxie Marlinspike
6c1a1fb9ad Use cache directory on removable storage for backups if present
Fixes #7692
2018-05-21 15:45:22 -04:00
Moxie Marlinspike
35d158cfee Treat Permissions "not now" as a denial
Fixes #7713
2018-05-21 15:45:22 -04:00
Moxie Marlinspike
a5047cb17b Fix for sender's expiring messages in group with unregistered user
Fixes #7719
2018-05-21 15:45:22 -04:00
Moxie Marlinspike
5006b36e2d Show lock notification immediately after setting is toggled
Fixes #7659
Closes #7678
2018-05-21 15:45:22 -04:00
Greyson Parrelli
102941c18c Fix QuoteView measuring when voice notes are present.
Fixes #7740
2018-04-26 17:41:37 -07:00
Greyson Parrelli
43622e603d Save replies in drafts.
Previously, quotes were not saved to drafts, meaning they would be lost
when leaving the conversation or app. Now, a QuoteId (which represents
the necessary data to restore the QuoteModel) is serialized and stored
in the DraftDatabase.

Fixes #7716
Closes #7729
2018-04-26 09:19:22 -07:00
Greyson Parrelli
6fbbc9d078 Render emoji's properly in quote bubbles.
Unfortunately, the change wasn't as simple as just switching to use our
EmojiTextView. That view only supported single-line text. I added
support for multi-line text.

Fixes #7704.
2018-04-24 12:18:33 -07:00
Greyson Parrelli
cbe394025d Fix reply-to colors in dark mode to increase contrast.
Fixes #7705
2018-04-20 17:35:48 -07:00
Nicholas Rizzio
e6f76159b0 Export "creating backup" string
Closes #7656
2018-04-19 17:59:31 -07:00
Henning Dodenhof
e0603abdd3 Use FileProvider for update file handling
Fixes #7654
Closes #7658
2018-04-19 13:30:21 -07:00
Moxie Marlinspike
2a1ce859c4 Add Moto G (5S) Plus to hardware AEC blacklist
For #7635
2018-04-19 10:58:39 -07:00
Moxie Marlinspike
8452fc6c58 Correctly avoid displaying about category in groups
Fixes #7702
2018-04-19 10:53:37 -07:00
Moxie Marlinspike
2ac0179d65 Handle odd sized buffers on backup import decrypt
Fixes #7701
2018-04-18 21:20:06 -07:00
Greyson Parrelli
fa99e8f0d0 Updated reply-to UI.
All UI components are now properly styled and functioning according to
spec.
2018-04-16 17:33:26 -07:00
Moxie Marlinspike
d567534609 replies 2018-04-16 17:33:26 -07:00
Moxie Marlinspike
8bec5a96f5 Make delivery receipts work correctly on CDMA networks
Fixes #7646
2018-04-16 17:33:26 -07:00
Moxie Marlinspike
d8a6fcf979 Retain latest 2 instead of latest 5 backups
Fixes #7650
2018-04-16 17:33:26 -07:00
Moxie Marlinspike
2c405d1769 Delete raw contacts that are marked for deletion
Fixes #7628
2018-04-16 17:33:26 -07:00
Moxie Marlinspike
821957137a Check for context liveness to prevent NPE
Fixes #7633
2018-04-16 17:33:26 -07:00
Greyson Parrelli
b8fbc91f33 Only show copy if text is selected, remove newlines from copied text.
We now check if _any_ text is selected when doing a batch selection
to determine if we should show the copy option. Also, previously it
was putting in empty lines for messages that don't have any text. I
changed it so empty messages have no effect on the text that is copied.

Fixes #7472
2018-04-16 17:33:26 -07:00
FeuRenard
404610fbcd Pass correct address from media overview to preview
Fixes #7384
Closes #7387
2018-04-16 17:33:26 -07:00
Moxie Marlinspike
3f3d7f549b Make an attempt to store/retrieve backups from removable storage
Fixes #7521
2018-04-16 17:33:26 -07:00
Moxie Marlinspike
7dd8baba5a Add permission callback to preference fragment 2018-04-16 17:33:26 -07:00
Moxie Marlinspike
eb0af13887 Fix location URL encoding
Fixes #7604
2018-04-16 17:33:26 -07:00
Moxie Marlinspike
72310ed3c6 Group member dialog tap takes you to recipient preference
Fixes #7463
2018-04-16 17:33:26 -07:00
Moxie Marlinspike
e86a9ce7eb Add phone number and direct dial to recipient preferences 2018-04-16 17:33:26 -07:00
Moxie Marlinspike
0b0853a223 Clear cache on update 2018-04-12 17:19:18 -07:00
Moxie Marlinspike
ccc3ff4aac Fix for Glide image caching issue
Fixes #7630
2018-04-09 09:03:42 -07:00
Moxie Marlinspike
ca471b1408 Explicitly remove messages.db journal
Fixes #7636
2018-04-05 03:50:33 -07:00
Moxie Marlinspike
3bceb0d8ec Delete old message DB 2018-04-04 05:09:43 -07:00
Moxie Marlinspike
0753ff85ed Default snippet type to 0 if it's null
Fixes #7551
2018-04-03 08:59:19 -07:00
Moxie Marlinspike
b9f99f9941 Manually calculate length of attachments if they're super old
Fixes #7560
2018-04-02 10:03:26 -07:00
Moxie Marlinspike
2c82b3610d Mark DB current after backup upgrade process
Fixes #7596
2018-04-02 06:27:50 -07:00
Greyson Parrelli
18039bc3f4 Show groups when searching for contacts.
Currently, if you're searching for a contact to start a conversation
with or send a share to (via the Android sharing system), groups do not
appear. With this change, groups will now appear when searching, located
under their own  heading.

Fixes #7202.
Closes #7577
2018-03-31 02:14:02 -07:00
Greyson Parrelli
a573ab7c76 Setup alternate domain front.
In preparation for Google shutting down domain fronting.

Closes #7584
2018-03-31 02:14:02 -07:00
Greyson Parrelli
ea374735e1 Render images in a conversation true-to-size.
Previously, we were always rendering images as squares. Instead of doing
that, we now render them as close to true-to-size as possible (within
reasonable min/max width/height boundaries).
2018-03-31 02:14:02 -07:00
Moxie Marlinspike
9f8b4cf892 Populate incoming attachments with width and height from message 2018-03-31 02:14:02 -07:00
Moxie Marlinspike
3c30db7edf No longer generate image thumbnails manually
Delete manually calculated image thumbnails
2018-03-31 02:14:02 -07:00
Moxie Marlinspike
95d76638dc Simple encrypted glide disk cache 2018-03-31 02:14:02 -07:00
Greyson Parrelli
7e1e666172 Strip EXIF metadata from all JPEG images.
Strip all EXIF metadata from all JPEGs by re-encoding the JPEG. This
will keep all of the necessary visual effects of the tags (by encoding
them directly in the image data) while stripped the EXIF tags
themselves.
2018-03-31 02:14:02 -07:00
Greyson Parrelli
10e5b24cfd Allow batch deletion of media.
It is now possible to batch-delete media in the "media overview" screen.
You can long press to enter multi-select mode. Then a delete button
appears on the menu bar. After pressing delete, you will get a
confirmation, and if the user confirms, the items will delete while a
progres dialog shows.
2018-03-31 02:14:02 -07:00
Greyson Parrelli
0c768a24e4 Allow deletion of media through preview.
When viewing a media in the media preview, you can delete it by pressing
a delete button on the action bar. It will then ask you to confirm your
choice. If you confirm, it will delete the attachment from the database
and from disk. If it was the only attachment for that message, the
message itself will also be deleted.
2018-03-31 02:14:02 -07:00
Moxie Marlinspike
d6610f0dd0 Add profile avatars to backup
Fixes #7450
2018-03-19 14:10:21 -07:00
Moxie Marlinspike
261296e41b Don't crash direct share service if avatar photo is missing
Fixes #7541
2018-03-19 13:17:57 -07:00
FeuRenard
9c0129c4b0 Allow skipping registration PIN intervals on success
Closes #7517
Closes #7518
2018-03-15 12:14:43 -07:00
Moxie Marlinspike
b168e14985 Move salt outside the loop 2018-03-15 10:18:14 -07:00
Moxie Marlinspike
73233c01ba Fix backup NPE
Fixes #7526
2018-03-14 23:40:01 -07:00
Moxie Marlinspike
90006e81db Add salt to backup header 2018-03-14 10:28:41 -07:00
Greyson Parrelli
f544b7d7b4 Reduce image stutter by using subsampling more often.
Fixes #7208.
2018-03-13 13:25:41 -07:00
Moxie Marlinspike
41d06fc8c2 Simplify reminder interval lookup
Fixes #7513
2018-03-13 09:39:56 -07:00
Moxie Marlinspike
aff65abe91 Hide keyboard after backup passphrase entered
Fixes #7508
2018-03-13 09:28:27 -07:00
Moxie Marlinspike
64afce5f66 Switch to parameterized statements for backup
Fixes #7507
2018-03-13 09:27:58 -07:00
Moxie Marlinspike
6b5da7f8cf Disable registration lock reminders for <=KK devices
Fixes #7500
2018-03-11 17:30:31 -07:00
Moxie Marlinspike
43d7e99a50 Don't offer backup restore on reregistration
Fixes #7502
2018-03-11 17:12:42 -07:00
平民·寻梦(Pingmin Fenlly Liu)
cc288d1e43 Just update to the new repo path "github.com/signalapp"
Closes #7469
2018-03-11 17:06:22 -07:00
junitas
7f7aab044c Escape single quotes in SQLite entries for message backups
Fixes #7491
Closes #7497
2018-03-11 17:00:53 -07:00
Moxie Marlinspike
c8dd62cecf Make it possible to set a zero value for screen lock timeout
Fixes #7485
2018-03-09 15:27:20 -08:00
Moxie Marlinspike
11ce4ee807 Actually increment event count 2018-03-09 14:29:15 -08:00
Moxie Marlinspike
40d14698b8 Fix NPE introduced by #6886 2018-03-09 11:14:37 -08:00
Moxie Marlinspike
34ed55d3ac Post backup progress event for every item
Fixes #7483
2018-03-09 11:03:18 -08:00
Moxie Marlinspike
954b2f22f6 Don't immediately prompt for registration lock pin after reregistration
Fixes #7484
2018-03-09 10:41:43 -08:00
Moxie Marlinspike
b39820dcb6 Clarify Registration Lock reminder
Fixes #7484
2018-03-09 10:40:29 -08:00
Moxie Marlinspike
1a24885110 Fix issue "home button" issue with screen lock
Fixes #7475
2018-03-09 10:25:29 -08:00
Moxie Marlinspike
29fcce23b1 Prevent double screen lock intent from firing
Fixes #7475
2018-03-08 17:41:27 -08:00
Moxie Marlinspike
a2d04f4806 Prevent us from sql injecting ourselves on backup/restore
Fixes #7478
2018-03-08 16:39:57 -08:00
Andy Staudacher
61a7062030 Remove obsolete workaround for DE/FI/SK shortcodes
libphonenumber supports these since December 2015 / January 2016.
Most of these changes went into libphonenumber-7.2.2 (Dec 15, 2015),
the last changes related to this into libphonenumber-7.2.4 (Jan 28, 2016).
This was about adding EU-wide helplines 116xxx (http://ec.europa.eu/digital-agenda/en/116-helplines).
See: https://github.com/googlei18n/libphonenumber/blob/master/java/release_notes.txt

Closes #6130
2018-03-07 09:59:43 -08:00
Sam Lanning
69f180a5ec Fix some potential integer overflows for expiration time
In a number of locations in the code, there were conversions of message
expiration times from seconds to milliseconds, and then assigned to `long`
contexts. However these conversions were being done as integer multiplication
rather than long multiplication, meaning that there was a potential for
overflows.

Specifically, the maximum value that could be represented before overflowing
was (2^31 / 1000 / 60 / 60 / 24) days = 24.8 days (< 1 month). Luckily the
current allowed timeouts are all less than that value, but this fix would
remove the artificial restriction, effectively allowing values of 1000x greater
(68 years), at least for android.

Related #5775
Closes #7338
2018-03-07 09:55:24 -08:00
Andrew Gaul
10c1ee70e8 Make some inner classes static
Closes #7370
2018-03-07 09:51:05 -08:00
FeuRenard
0efda2df91 Make toast after saving attachment translatable
Closes #7374
2018-03-07 09:41:33 -08:00
art1fa
4bdb2acd29 Batch selection mode improvements
Simplified and now the same for conversation and conversation list.

Added also some styling.

Closes #7410
2018-03-07 09:38:51 -08:00
FeuRenard
527e39eee8 Don't save white space drafts
Fixes #7308
Closes #7383
2018-03-07 09:33:57 -08:00
Marek Sebera
694a5de2c3 Send m-notifyresp-ind (NotifyRespInd) for retrieved MMS on Lollipop API 2018-03-06 17:34:31 -08:00
junitas
4b5d7bbfa4 Ignore swipe events for ConversationListItemInboxZero
Fixes #7423
2018-03-06 09:35:13 -08:00
Moxie Marlinspike
110d33ddf8 Support for Registration Lock PINs 2018-03-05 16:13:56 -08:00
Moxie Marlinspike
d28dc670ea Migrate to Android fingerprints and auth for Signal screen lock 2018-03-05 16:11:49 -08:00
Moxie Marlinspike
3970a30e14 Add chunk IV to chunk MAC 2018-03-05 16:11:49 -08:00
Moxie Marlinspike
24e573e537 Support for full backup/restore to sdcard 2018-03-05 16:11:49 -08:00
Moxie Marlinspike
9f6b761d98 Migrate sessions into database 2018-03-05 16:11:49 -08:00
Moxie Marlinspike
9f3c04dfb5 Migrate prekeys into database 2018-03-05 16:11:49 -08:00
Moxie Marlinspike
6239508b39 Clean file names for belt and suspenders 2018-03-05 16:11:49 -08:00
Moxie Marlinspike
71c7ef5b5e Support for custom call ringtone selection and per-chat ringtones 2018-03-05 16:11:49 -08:00
Moxie Marlinspike
bebdbe2aaa Remove master secret requirement from SMS received job
Fixes #7444
2018-02-28 10:45:50 -08:00
Moxie Marlinspike
18aa202695 Really really delay SMS processing until sqlcipher migration completes
Blocking the SMS job on the screen lock isn't enough, since then
the job races against the migration.

Fixes #7390
2018-02-26 14:02:12 -08:00
Moxie Marlinspike
a0a9e412b4 Correctly lock screen when locked from conversation list
Fixes #7441
2018-02-26 10:47:41 -08:00
Moxie Marlinspike
028c6edd8a Manually calculate attachment offsets
The CipherInputStream skip() method is pretty non-functional

Fixes #7438
2018-02-24 11:09:26 -08:00
Moxie Marlinspike
7318236286 Delay processing SMS messages until after sqlcipher migration
When screen lock passphrase is enabled

Fixes #7390
2018-02-21 18:49:52 -08:00
Moxie Marlinspike
0bbe83f8f2 Don't copy column to sqlcipher db if it doesn't exist there
Fixes #7386
2018-02-05 17:32:24 -08:00
Moxie Marlinspike
2b651ee323 Prevent NPE in #7375 2018-02-05 12:08:40 -08:00
Moxie Marlinspike
9d5d43cf3a Wait to process messages until after migration when screenlocked
Fixes #7390
2018-02-04 11:26:02 -08:00
Moxie Marlinspike
93ca2ad8cf Fix new conversation activity crash 2018-02-01 19:36:09 -08:00
Moxie Marlinspike
3633d805c8 More MasterSecret cleanup 2018-02-01 19:22:48 -08:00
Moxie Marlinspike
59092e2ec0 No need for an encrypted serializer any longer 2018-02-01 18:33:12 -08:00
Moxie Marlinspike
e6a069af6d Remove unnecessary body model 2018-02-01 18:29:09 -08:00
Moxie Marlinspike
23aee53c7d Add determinte progress and foreground service for sqlcipher migration 2018-02-01 16:01:24 -08:00
Moxie Marlinspike
bdd4b456c4 Have stream generate random value 2018-02-01 15:42:28 -08:00