Commit graph

2269 commits

Author SHA1 Message Date
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
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 799b9c2074 Adjust media preview viewpager swipe direction for rtl 2018-01-23 13:43:37 -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 bc64230a65 Switch to HackyViewPager for media preview
Fixes #7344
Fixes #7335
2018-01-18 10:16:35 -08:00
Moxie Marlinspike 763fa0dd21 Catch exception on image decoding error in notification 2018-01-18 10:11:33 -08:00
Moxie Marlinspike e60715587f Update service lib to 2.7.0 2018-01-18 10:01:41 -08:00
Moxie Marlinspike 95ebae5d5f Support onStop/onStart media display in the correct position
Fixes #7330
Fixes #7329
2018-01-16 12:06:55 -08:00
Moxie Marlinspike fe02b3f8d3 Catch exception from misconfigured MMSC
Fixes #7339
2018-01-16 11:32:51 -08:00
Moxie Marlinspike 94e2b9e66e Make video player in media player control a view stub 2018-01-16 11:21:58 -08:00
Moxie Marlinspike b307980d8c Perform a contact sync with every directory refresh 2018-01-04 11:56:55 -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 34424a9b3e Fix crash when signal messages disabled in group conversation
Fixes #6419
Closes #6803
2017-12-25 15:57:33 -08:00
Moxie Marlinspike a798f97aa3 Update to webrtc M64 2017-12-21 16:37:07 -08:00
Moxie Marlinspike 6dcec7c2c5 Fix service calls that won't foreground 2017-12-20 11:27:57 -08:00
Moxie Marlinspike 512dc19471 Fix dynamic permissions problem for MMS messages 2017-12-20 11:21:00 -08:00
Moxie Marlinspike 425d6b8adf Fix crash for dynamic permissions + background directory load 2017-12-20 11:10:12 -08:00
Moxie Marlinspike 4acedd2a4b Fix notification ringtone problems
Default ringtone was often showing up as a call tone

Silent wasn't working correctly globally
2017-12-19 14:42:00 -08:00
Moxie Marlinspike d782d3006b Per-recipient ringtones can't be file based 2017-12-19 11:01:55 -08:00
Moxie Marlinspike 9c77ffc2a4 The webrtc busy state could be idle, but system dialer connected 2017-12-19 10:57:34 -08:00
Moxie Marlinspike 0ec1ae4ed3 Request needed permissions for thread search 2017-12-19 10:54:06 -08:00
Moxie Marlinspike f22186e6f4 Debounce call screen answer button
Fixes #7274
2017-12-15 15:27:23 -08:00
Moxie Marlinspike 4de14a5dc1 Only use startForegroundService for initial service construction 2017-12-15 09:45:00 -08:00
Moxie Marlinspike f72e35bf42 Fix typo that requests SMS permission for media/group message
Fixes #7271
2017-12-13 10:29:19 -08:00
Moxie Marlinspike 303b98b7c2 Register and unregister receiver with same context
Fixes #7267
2017-12-12 11:16:40 -08:00
Moxie Marlinspike d5215b3593 Avoid potentially unregistering bluetooth twice 2017-12-11 09:52:03 -08:00
Moxie Marlinspike f315b1db80 Make save attachment task toast location instead of snackbar 2017-12-08 15:21:46 -08:00
Moxie Marlinspike f100137e0f Synchronize and copy Recipient.getParticipants 2017-12-08 14:38:01 -08:00
Moxie Marlinspike 37092eee01 Externalize strings 2017-12-08 14:36:56 -08:00
Moxie Marlinspike 261d187567 Don't perform multi-device contact update without contact perms 2017-12-08 14:36:36 -08:00
Moxie Marlinspike b58c87a56b Only notify when address is in contacts 2017-12-07 11:53:17 -08:00
Moxie Marlinspike 23e9b3a61e Fix colors in all images toolbar
Fixes #7242
2017-12-05 12:07:37 -08:00
Moxie Marlinspike 06e0d7d72d Appease the linter 2017-12-05 11:52:03 -08:00
Moxie Marlinspike 27e11e9627 Make sure we have SEND_SMS permission before sending an SMS
Fixes #7246
2017-12-05 11:35:15 -08:00
Moxie Marlinspike 8686691a5a Fix missing recipient calculation for system contact
Fixes #7244
2017-12-05 10:27:34 -08:00
Moxie Marlinspike 8b3a3d163f Don't check subscription info on dual sim devices wihout permission
Fixes #7239
2017-12-02 12:23:14 -08:00
Moxie Marlinspike 02c422cb26 Some old group avatar IDs can be 0
Fixes #7235
2017-12-01 13:56:56 -08:00
Moxie Marlinspike 3523952ef9 As of 'N' we can no longer offer external ringtone selection
1. Replace custom ringtone picker with system Intent, since we
   don't need it anymore. Fixes #7174

2. Make sure 'silent' ringtone selection is stored appropriately
   Fixes #7115 Closes #7141

3. Replace any existing file:// notification URIs with the system
   default Fixes #7234
2017-12-01 12:55:24 -08:00
Moxie Marlinspike 4cb2ac7b27 Use FileProvider for external camera capture Uri on L+
Fixes #7237
2017-12-01 11:06:37 -08:00
Moxie Marlinspike 8cd5ff5fa1 Mark directory retrieved on registered update 2017-11-30 13:30:15 -08:00
Moxie Marlinspike 6f10de5e30 Fix trying to launch a dialog from an application context 2017-11-30 13:05:16 -08:00
Moxie Marlinspike c58d5c32bb Remove request for permission that doesn't exist < O 2017-11-30 13:04:11 -08:00
Moxie Marlinspike acfc9d75e0 Use startForegroundService instead of startService on Android 8 2017-11-30 10:26:41 -08:00
Moxie Marlinspike d9ab1a93f8 Fix problem with creating group and empty avatar 2017-11-30 10:26:41 -08:00
Moxie Marlinspike c2dbb34b25 Extract string resource 2017-11-30 10:26:41 -08:00
Moxie Marlinspike ed508a8def Be more explicit with mastersecret passing 2017-11-30 10:26:41 -08:00
Moxie Marlinspike d5cb804f90 Switch from PACKAGE_REPLACED to MY_PACKAGE_REPLACED
As part of the Oreo 'no more implicit intents' thing
2017-11-30 10:26:41 -08:00
Moxie Marlinspike c8104a91a4 Remove dead code 2017-11-30 10:26:41 -08:00
Moxie Marlinspike 4c8e259b56 Update compileSdk to 27 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 99a26e2bcc Don't invalidate entire recipient cache when contact data changes 2017-11-30 10:26:41 -08:00
Moxie Marlinspike f855e161d9 Ensure notifications for new users won't be generated first fetch 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 73c75a9b34 Don't delete GCM id during registration if it never existed
Fixes #7229
2017-11-28 14:33:22 -08:00
Moxie Marlinspike a350106f7d Don't check DB workaround if push group
Fixes #7225
2017-11-27 09:44:50 -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 ba5febd222 Fix some emoji rendering issues related to obsolete images
1) The "obsolete" images like "swimmer" need to alias to
"man_swimming" so that they can be rendered correctly.

2) There are a whole bunch of emoji-data elements
(like white_frowning_face) that have "unified" code points which
have changed to include a "terminator."

Fixes #7212
2017-11-20 19:11:26 -08:00
Moxie Marlinspike c1b2098bd9 Fix race condition that would display end call button over answer
Fixes #7211
2017-11-20 11:17:50 -08:00
Moxie Marlinspike d3c72fa697 Avoid green background on item below archived conversation list item 2017-11-19 18:34:03 -08:00
Moxie Marlinspike 58f1e68961 Update emoji
Fixes #6637
Fixes #7206
2017-11-19 18:11:25 -08:00
Moxie Marlinspike be6a51b123 Hide photo/mic options on whitespace entry
Fixes #7204
2017-11-19 16:53:12 -08:00
Moxie Marlinspike 08c72ed874 Don't show group ID in recent contact selection list
Fixes #7201
2017-11-19 16:46:12 -08:00
Moxie Marlinspike 86bd2351bc Replace answer/decline button and action for incoming calls
Fixes #7199
2017-11-19 16:32:22 -08:00
Moxie Marlinspike cf81815bf6 Add recent chats to top of share list 2017-11-16 15:21:46 -08:00
Moxie Marlinspike c5a9f27c31 Catch some activity not found exceptions for expired builds 2017-11-16 12:31:42 -08:00
Moxie Marlinspike de812d3f0f Extract string resources 2017-11-16 12:28:29 -08:00
Moxie Marlinspike 2da47c3bb3 Fix share list crash and update look/feel
Fixes #7195
2017-11-16 12:22:09 -08:00
Moxie Marlinspike e37c06c563 Show dialog if another device registered with same number 2017-11-15 16:29:00 -08:00
Moxie Marlinspike 909c0c544c Make sure thread preview text is to left of unread indicator 2017-11-15 15:49:45 -08:00
Moxie Marlinspike b42e91134b Remove inset divider from last recyclerview element 2017-11-14 12:09:19 -08:00
Moxie Marlinspike 682abbf66b Add unread count to synthesized cursor 2017-11-14 11:47:15 -08:00
Moxie Marlinspike ad9a995ffa Correctly display cropped profile image
Fixes #7191
2017-11-14 10:50:17 -08:00
Moxie Marlinspike 21ddc1dbba Fix profile crash
Fixes #7192
2017-11-14 10:50:17 -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 03573df00f Add inset dividers in conversation list
Closes #7074
2017-11-14 10:50:17 -08:00
Moxie Marlinspike 40caf20188 Make sure nav drawable is mutable before tinting 2017-11-14 10:50:17 -08:00
Moxie Marlinspike 405ee3b741 Improve search bar visibility 2017-11-14 10:50:17 -08:00
Moxie Marlinspike 9a75f49aa1 Add an empty state for search 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
Moxie Marlinspike bb878f8a67 Adjust Conversation List toolbar to match RecyclerView alignment 2017-11-14 10:50:17 -08:00
Moxie Marlinspike 3097c2855e Add empty state for conversation list 2017-11-14 10:50:17 -08:00
Moxie Marlinspike 90ff0e58b0 Update registration flow 2017-11-14 10:50:17 -08:00
Moxie Marlinspike e56e55363d Add some debug logging 2017-11-14 10:49:54 -08:00
Moxie Marlinspike 50ae2dd1b8 Fix multi device race condition
Fixes #7175
2017-11-12 13:54:37 -08:00
Moxie Marlinspike ad6ae10a41 Fix scaling issue when loading emoji sprites
Fixes #5973
// FREEBIE
2017-11-06 08:11:36 -08:00
Moxie Marlinspike bcdf3bf311 Fix for scribbles on Android 8
Fixes #6998
// FREEBIE
2017-11-03 11:32:18 -07:00
Moxie Marlinspike 3e9bfcb3fd Delete "external" persistent blobs on cleanup
Also switch external persistent blog directory to cache

Fixes #6909
// FREEBIE
2017-11-03 10:53:37 -07:00
Moxie Marlinspike 3ed82c1726 Glide -> glideRequests in GiphyAdapter
// FREEBIE
2017-11-02 18:12:06 -07:00
Christian Ascheberg 69e656af76 Add back a way to access quick contact from conversation
Closes #7051
// FREEBIE
2017-11-01 15:56:46 -07:00
Greg Cooksey 23a23ebd72 CreateProfileActivity uses DynamicTheme
Fixes #6981
Closes #6997
// FREEBIE
2017-11-01 15:56:46 -07: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
Nicholas Rizzio 0ab9b56a18 Add a space between group member names
Fixes #7059
Closes #7060
// FREEBIE
2017-11-01 15:56:46 -07:00
haffenloher 3df9112cf8 Fix synced sent media messages expiring too fast
Fixes #6928
Closes #7135
2017-11-01 15:56:46 -07:00
Moxie Marlinspike 9a8d058051 Update to glide 4.3.0
// FREEBIE
2017-11-01 15:56:44 -07:00
Moxie Marlinspike 6d88710a88 Update to libsignal-service 2.6.11
// FREEBIE
2017-11-01 15:56:31 -07:00
Moxie Marlinspike e056bd1aa2 Update giphy connectivity strategy for glide
// FREEBIE
2017-11-01 15:51:38 -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 10f224ede5 Update to glide 4.x
// FREEBIE
2017-10-11 17:47:12 -07:00
Moxie Marlinspike 17dd681dc8 Run all AsyncTasks on thread pool executor
Should Fix #7002
2017-10-23 13:03:32 -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 7a8bd0597a Correctly load group avatars in RecipientPreferencesActivity
Fixes #7102
// FREEBIE
2017-10-16 10:16:15 -07:00
Moxie Marlinspike 5711adb2c9 Fix profile out of memory errors on low mem devices
Fixes #7094
// FREEBIE
2017-10-15 10:00:03 -07:00
Moxie Marlinspike 4bd3094bad Fix problem where recycled group avatar icons have stale listener
Fixes #7089
// FREEBIE
2017-10-13 09:51:37 -07:00
Moxie Marlinspike 4e45d53bd9 Scroll on list post
Fixes #7054

// FREEBIE
2017-10-10 10:00:24 -07:00
Moxie Marlinspike d40fea9423 Catch Glide exception when loading avatar image
Workaround for #7016
// FREEIBE
2017-10-10 09:18:00 -07:00
Moxie Marlinspike c15d1a3bce Update pipe when injecting message sender
// FREEBIE
2017-10-10 09:14:53 -07:00