Commit Graph

457 Commits

Author SHA1 Message Date
Moxie Marlinspike
71c7ef5b5e Support for custom call ringtone selection and per-chat ringtones 2018-03-05 16:11:49 -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
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
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
3633d805c8 More MasterSecret cleanup 2018-02-01 19:22:48 -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
Moxie Marlinspike
7b353a94d8 Trigger DB schema change on application DB update Activity 2018-01-31 17:49:08 -08:00
Moxie Marlinspike
5496f5baac Deprecate encrypted storage DB types 2018-01-30 17:45:12 -08:00
Moxie Marlinspike
f36b296e2e Migrate from SQLite and ciphertext blobs to SQLCipher + KeyStore 2018-01-30 17:27:05 -08:00
Moxie Marlinspike
14644077e7 Change media preview swipe direction based on entry point
Fixes #7354
2018-01-23 12:52:24 -08:00
Moxie Marlinspike
24e6605024 Reverse media order in ViewPager
Fixes #7354
2018-01-22 09:32:27 -08:00
Moxie Marlinspike
8bba45f396 Add swipe gestures to media view
Fixes #2355
Closes #6632
2018-01-04 11:11:49 -08:00
Moxie Marlinspike
b58c87a56b Only notify when address is in contacts 2017-12-07 11:53:17 -08:00
Moxie Marlinspike
d9ab1a93f8 Fix problem with creating group and empty avatar 2017-11-30 10:26:41 -08:00
Moxie Marlinspike
7a5846a6d4 Move more system contact info into recipient database
1) Move contact URI, contact photo URI, and custom label
   into recipient database, so there are no longer any
   contact DB queries during Recipient object loading.

2) Use a SoftHashMap so that any referenced Recipient objects
   can't get kicked out of the cache.

3) Don't load Recipient objects through the provider during sync.
   This was a super expensive thing to do, and blew up the cache.

4) Only apply changes to Recipient objects during sync if they
   are in the cache. Otherwise, there should be no outstanding
   references, and the changes are fine going exclusively to
   the DB.
2017-11-30 10:26:41 -08:00
Moxie Marlinspike
64c8b4b2ef Support for selective permissions 2017-11-30 10:26:41 -08:00
Moxie Marlinspike
66e1be1aeb Don't invalidate entire recipient cache when contact data changes 2017-11-30 10:26:41 -08:00
Moxie Marlinspike
7eb089c9de Temporary fix for Signal contact displaying as SMS for N seconds
The whole recipient pipeline needs to be changed more subsantially,
particularly given the way directory discovery works with it. This
will temporarily solve the problem though.
2017-11-25 09:50:36 -08:00
Moxie Marlinspike
cf81815bf6 Add recent chats to top of share list 2017-11-16 15:21:46 -08:00
Moxie Marlinspike
682abbf66b Add unread count to synthesized cursor 2017-11-14 11:47:15 -08:00
Moxie Marlinspike
534dec282f Brighten light theme
1) Brighten background color

2) Add unread indicator in conversation list

3) Eliminate some conversation list overdraw
2017-11-14 10:50:17 -08:00
Moxie Marlinspike
9c50057909 Add an empty state for archived 2017-11-14 10:50:17 -08:00
Christian Ascheberg
fdd070c1dd Do not show sent checkmark for verification status changes
Fixes #6743
Closes #7041
// FREEBIE
2017-11-01 15:56:46 -07:00
Moxie Marlinspike
e7937fd424 Cache external address formatter for better performance
// FREEBIE
2017-10-11 17:47:12 -07:00
Moxie Marlinspike
b80408bcb4 Use Glide for all contact photo caching
// FREEBIE
2017-10-11 17:47:12 -07:00
Moxie Marlinspike
263846bba0 Fix mms group migration for those who haven't encountered it yet
Fixes #7091
// FREEBIE
2017-10-23 09:52:34 -07:00
Moxie Marlinspike
445f3c234c Connect "mark all read" to sync and read receipts
Fixes #7069
// FREEBIE
2017-10-08 18:09:46 -07:00
Veeti Paananen
eb456ef2b0 Fix implicit locale string formatting bugs
Depending on the phone language the default format may use Arabic
numerals, etc. when not desired.

Bug: fixes #7006
Closes #7040
2017-10-04 11:36:43 -07:00
Moxie Marlinspike
9a876a3672 Show "you" in MediaPreviewActivity
Fixes #7038
// FREEBIE
2017-10-04 11:35:16 -07:00
Moxie Marlinspike
b7340cc356 Don't show voice notes in conversation documents overview
Fixes #7029
// FREEBIE
2017-10-03 16:43:31 -07:00
Moxie Marlinspike
2c1337b33e Make early receipts work in group messages
For both conversation item view and message details view

// FREEBIE
2017-10-02 14:54:55 -07:00
Moxie Marlinspike
e145875164 Fix json serialization for group message error
Fixes #6919
// FREEBIE
2017-10-02 10:35:49 -07:00
Moxie Marlinspike
285947eb66 Show per-member delivery/read status on message info in groups
// FREEBIE
2017-10-01 22:36:52 -07:00
Moxie Marlinspike
8ce914a344 Refactor media overview activity to display documents
// FREEBIE
2017-10-01 22:36:52 -07:00
Moxie Marlinspike
c6b2e785a5 Reorganize conversation media activity to have sticky headers
// FREEBIE
2017-10-01 22:36:52 -07:00
Moxie Marlinspike
b47665aa44 Fix migration typo
// FREEBIE
2017-10-01 22:36:52 -07:00
Moxie Marlinspike
4828a8a274 Add conversation media photo rail to recipient preferences
// FREEBIE
2017-10-01 22:36:52 -07:00
Moxie Marlinspike
cb9bc9659b Support for read receipts
// FREEBIE
2017-10-01 22:36:52 -07:00
Moxie Marlinspike
74779adc34 Use correct open helper for old directory database
// FREEBIE
2017-09-19 11:03:18 -07:00
Moxie Marlinspike
260383ac21 Fix problem with direct share
Fixes #6968
// FREEBIE
2017-09-15 10:36:33 -07:00
Moxie Marlinspike
5a0f671aa4 Fix not sending group info request messages
Fixes #6962
// FREEBIE
2017-09-13 17:19:59 -07:00
Moxie Marlinspike
afed60f870 Handle recipient modification callbacks on main thread
// FREEBIE
2017-09-08 11:36:09 -07:00
Moxie Marlinspike
989ea4042c MMS group includes the sender
Fixes #6942
// FREEBIE
2017-09-08 11:19:57 -07:00
Moxie Marlinspike
032eaa4389 Fix crash on conversation list search
Fixes #6936
// FREEBIE
2017-09-07 13:52:58 -07:00
Moxie Marlinspike
bcff186b10 Add self to MMS groups when migrating
Fixes #6925
// FREEBIE
2017-09-06 16:08:20 -07:00
Moxie Marlinspike
f17af19d09 Access all RecipientDatabase settings directly from Recipient
// FREEBIE
2017-08-28 10:30:50 -07:00
Moxie Marlinspike
d1790dfe17 Rename RecipientPreferences -> RecipientSettings
// FREEBIE
2017-08-28 10:30:50 -07:00
Moxie Marlinspike
8e6ca53023 Rename RecipientPreferencesDatabase -> RecipientDatabase
// FREEBIE
2017-08-28 10:30:50 -07:00
Moxie Marlinspike
6924f0519e No need for a RecipientFactory any longer
// FREEBIE
2017-08-28 10:30:50 -07:00
Moxie Marlinspike
6af836735b Remove unnecessary logging
// FREEBIE
2017-08-28 10:30:50 -07:00
Moxie Marlinspike
1b2f52209d Display unknown sender footer for unknown senders
// FREEBIE
2017-08-28 10:30:50 -07:00
Moxie Marlinspike
5942e93a33 Share profile key when initiating a conversation
// FREEBIE
2017-08-28 10:30:50 -07:00
Moxie Marlinspike
df99deb480 Insert profile creation into registration flow, fix capture
// FREEBIE
2017-08-28 10:30:50 -07:00
Moxie Marlinspike
e7c20499ec Display profile name in when appropriate
Display in conversation list, conversation actionbar, group
messages, and group members list when address is not in system
contacts

// FREEBIE
2017-08-28 10:30:50 -07:00
Moxie Marlinspike
77a216b705 Support for retrieving and storing profile information
Initial support for sharing profile keys

// FREEBIE
2017-08-28 10:30:50 -07:00
Moxie Marlinspike
da94fd5f9e Join group information into conversation list query
// FREEBIE
2017-08-28 10:30:50 -07:00
Moxie Marlinspike
159fdb317f Store system contacts display name in recipient preferences db
// FREEBIE
2017-08-28 10:30:50 -07:00
Moxie Marlinspike
5a5e47f2df Move "directory" information into RecipientPreferencesDatabase
// FREEBIE
2017-08-28 10:30:50 -07:00
Moxie Marlinspike
a02f223a96 Join recipient preferences into thread query for faster lookup
// FREEBIE
2017-08-28 10:30:50 -07:00
Moxie Marlinspike
375207f073 Switch MMS groups to use the group database infrastructure
Eliminate the concept of 'Recipients' (plural). There is now just
a 'Recipient', which contains an Address that is either an individual
or a group ID.

MMS groups now exist as part of the group database, just like push
groups.

// FREEBIE
2017-08-28 10:30:50 -07:00
mcloo
60eaade6b0 Fix plaintext export XML name escaping
Fixes #6830
Closes #6861
2017-08-22 15:22:03 -07:00
Moxie Marlinspike
a80fe178ea Canonicalize addresses during import from system SMS database
// FREEBIE
2017-08-10 12:30:13 -07:00
Moxie Marlinspike
8de9261081 MMS addresses can be email addresses
Fixes #6853
// FREEBIE
2017-08-04 09:22:58 -07:00
Moxie Marlinspike
cb4303ac23 Handle migration case where recipient_ids is completely empty
No idea how a DB is in that state, but apparently it's possible

Fixes #6850
// FREEBIE
2017-08-03 09:32:56 -07:00
Moxie Marlinspike
9a78615991 Switch regexp matcher to find() in order to handle alpha addresses
Any address with an alpha character anywhere in it should be used
as-is.

Fixes #6849

// FREEBIE
2017-08-03 09:24:08 -07:00
Moxie Marlinspike
7f46e99f9c Use SIM country code when registered number is unavailable
Convert directory operations to Addresses

Fixes #6845
// FREEBIE
2017-08-02 12:51:46 -07:00
Moxie Marlinspike
1e934f6146 Escape addresess in thread and recipient pref migrations
For clients that have not yet migrated

// FREEBIE
2017-08-02 11:08:38 -07:00
Moxie Marlinspike
aacf50316d Escape addresses in thread, recipient pref, and group databases
Fixes #6847
// FREEBIE
2017-08-02 11:04:10 -07:00
Moxie Marlinspike
24c48afd2e Fix typo in migration constraint resolution
Fixes #6846

// FREEBIE
2017-08-02 08:02:15 -07:00
Moxie Marlinspike
9a55632202 During migration, support recipient id of "-1"
Fixes #6843
// FREEBIE
2017-08-01 18:45:13 -07:00
Moxie Marlinspike
6ed549cfb2 If two recipient ids get canonicalized to the same thing, drop one
There's not a great way for me to know which of them is the "real"
entry, which means that I could be deleting the wrong one. In the
case of recipient "preferences," it's hopefully not a huge loss,
and there aren't any other great options.

Fixes #6838

// FREEBIE
2017-08-01 14:52:03 -07:00
Moxie Marlinspike
8a5c89244a Be more liberal with migration addresses.
Anything alpha is an address as-is.

// FREEBIE.
2017-08-01 14:46:38 -07:00
Moxie Marlinspike
a67d0b18ff Be more liberal with external address formatting
A string like "bonbon" should just be "bonbon". That is apparently
a valid SMS source address.

// FREEBIE
2017-08-01 14:04:51 -07:00
Moxie Marlinspike
0ae60da68b Fix some bugs that would mis-label threads in migration
// FREEBIE
2017-07-31 14:04:47 -07:00
Moxie Marlinspike
737810475e Remove the Canonical Address Database
This was a holdover from Signal's origins as a pure SMS app.
It causes problems, depends on undefined device specific behavior,
and should no longer be necessary now that we have all the
information we need to E164 all numbers.

// FREEBIE
2017-07-31 12:02:29 -07:00
Moxie Marlinspike
82b5b35d3b Eliminate MediaNetworkRequirement style attachment job handling
// FREEBIE
2017-07-21 15:59:27 -07:00
Gavin Howard
381237a315 Make plaintext export more compatible with SMS Backup and Restore
This commit adds the contact name and the readable date (and time) to
the plaintext export of every message. That's because that is how SMS
Backup and Restore does it, so this commit makes Signal more compatible.

Closes #6452
// FREEBIE
2017-07-06 12:19:12 -07:00
Christian Ascheberg
d0bb68e137 Fix group creation through group info request
Closes #6763
// FREEBIE
2017-07-05 14:19:55 -07:00
Christian Ascheberg
95d48bd3e9 Improve wording of joined contact notification
Fixes #6757
Closes #6764
// FREEBIE
2017-07-05 14:18:07 -07:00
Moxie Marlinspike
074e46b2d9 Enable verification syncing
// FREEBIE
2017-06-23 13:59:06 -07:00
Moxie Marlinspike
04f364942e Don't update thread state for groups w/ verified/default SNs
Fixes #6744
// FREEBIE
2017-06-19 11:20:15 -07:00
Moxie Marlinspike
ec240a94e6 Fix capitalization (innocuous)
// FREEBIE
2017-06-15 12:04:50 -07:00
Moxie Marlinspike
76c28cfa7a Add support for SN verification
// FREEBIE
2017-06-09 19:58:01 -07:00
Moxie Marlinspike
7e40204eb2 Fix migration
Fixes #6695
// FREEBIE
2017-06-01 10:57:45 -07:00
FeuRenard
a9ea672888 Resolve media message race condition
Fixes #6677
Closes #6681
2017-05-31 14:51:48 -07:00
Moxie Marlinspike
5455bdffb2 Make sure existing identity entries are approved in migration
// FREEBIE
2017-05-31 14:51:48 -07:00
Christian Ascheberg
662fe826cb Fix conversation list safety number change snippet for groups
Fixes #5985
Closes #6655
// FREEBIE
2017-05-31 14:51:48 -07:00
Moxie Marlinspike
d507756821 Some identity key handling changes
1) Prefetch identity keys when possible

2) Always accept prefetched keys or keys from incoming messages

3) Block sending only if it's a recent change, or if always
   block is enabled

// FREEBIE
2017-05-31 14:51:48 -07:00
Moxie Marlinspike
b78c05e70b Keep track of when audio attachments are voice notes
// FREEBIE
2017-05-11 22:46:35 -07:00
Moxie Marlinspike
51d6144591 Significant MMS changes
1) Remove all our PDU code and switch to the PDU code from the
   klinker library

2) Switch to using the system Lollipop MMS library by default,
   and falling back to our own custom library if that fails.

3) Format SMIL differently, using code from klinker instead of
   what we've pieced together.

4) Pull per-carrier MMS media constraints from the XML config
   files in the klinker library, instead of hardcoding it at 280kb.

Hopefully this is an improvement, but given that MMS is involved,
it will probably make things worse instead.
2017-05-08 18:14:55 -07:00
Jonas Vautherin
dd3cef5ec2 Refactor storage management to have a centralized,
clearer way to get the Signal output directories

Closes #6476
// FREEBIE
2017-05-06 14:06:04 -07:00
Moxie Marlinspike
cb670d6783 Improve UI send latency
// FREEBIE
2017-04-26 10:27:30 -07:00
Moxie Marlinspike
8e7c7a9c54 Improve video thumbnail generation and handling on send side
For direct attach only

// FREEBIE
2017-04-21 23:05:59 -07:00
Moxie Marlinspike
75782affd1 Adjust joined signal string
// FREEBIE
2017-03-31 08:54:07 -07:00
Moxie Marlinspike
056f2717ed Remove duplicate column in SQL query
// FREEBIE
2017-03-30 16:12:42 -07:00
Moxie Marlinspike
f67eb5f9f3 Support for receiving arbitrary attachment types
// FREEBIE
2017-03-29 18:17:34 -07:00
Christian Ascheberg
3506f2db12 Improve group update descriptions
Closes #5416
// FREEBIE
2017-03-14 14:26:14 -07:00
Moxie Marlinspike
2f46c6ca1f Don't redisplay notifications after they have been dismissed
Fixes #5751
Fixes #6218
// FREEBIE
2017-03-14 10:09:24 -07:00