Compare commits

..

458 Commits

Author SHA1 Message Date
Greyson Parrelli 3cdf17ccaa Bump version to 4.43.5 2019-07-01 17:15:46 -04:00
Greyson Parrelli a8dbfd812d Fix issue with bad camera quality on some devices.
There appears to be a weird bucketing thing that happens on some
devices, where if you give them a resolution that's too small, it'll
default you to some potato resolution. So we just bumped it up to
1920x1920, and that seems to be working on my swath of devices.
2019-07-01 17:15:14 -04:00
Greyson Parrelli ff3890cc12 Name threads more consistently. 2019-07-01 17:15:04 -04:00
Greyson Parrelli 9c196bd2d5 Fix issue where an empty file could be read forever.
If you gave the class an empty file, it would get back -1 for read(),
causing it to fall forever into negative values, never escaping the
existing conditions.

The side effect of this was weird corner cases where these infinite
reads could clog up threads, causing audio recordings to get blocked
and such.

Fixes #8898
2019-07-01 17:15:01 -04:00
Greyson Parrelli 4508aa7c35 Clean up logging. 2019-07-01 15:12:34 -04:00
Greyson Parrelli f15a629731 Bump version to 4.43.4 2019-06-30 09:43:32 -04:00
Greyson Parrelli 857fda42c8 Fix audio playback on API 28 devices. 2019-06-30 09:41:58 -04:00
Greyson Parrelli a5eb823a17 Avoid crash with Address parcelable.
There seems to be a bad implementation of Address parcelization that
pops up in certain scenarios. We can avoid it by just excluding it
from the parcel altogether.
2019-06-30 09:26:08 -04:00
Greyson Parrelli 31435128f4 Bump version to 4.43.3 2019-06-30 01:10:50 -04:00
Greyson Parrelli 6656077edc Updated language translations. 2019-06-30 01:10:34 -04:00
Greyson Parrelli 9974f6edf1 Correctly retrict BucketInfo API level. 2019-06-30 00:54:51 -04:00
Greyson Parrelli 6715a89a25 Disable default CameraX initializer.
CameraX was initializing Camera2 API stuff on API < 21, causing
crashes at boot. To handle this, we disable the default
ContentProvider initializer and initialize things ourselves for
appropriate API levels.
2019-06-30 00:54:42 -04:00
Greyson Parrelli 23b4a9b191 Bump version to 4.43.2 2019-06-28 19:17:35 -04:00
Greyson Parrelli 666cdeae6b Change compileSdk back to 28. 2019-06-28 19:16:27 -04:00
Greyson Parrelli 5d7ac81c4b Bump version to 4.43.1 2019-06-28 18:57:34 -04:00
Greyson Parrelli 93856ed8cf Fix some bookkeeping in CameraXFragment. 2019-06-28 18:57:04 -04:00
Greyson Parrelli 84fd1a9140 Bump version to 4.43.0 2019-06-28 18:39:32 -04:00
Greyson Parrelli 9949e5e3a5 Updated language translations. 2019-06-28 18:39:20 -04:00
Alan Evans c0a44c7fc3 Target API 28. 2019-06-27 16:18:53 -04:00
Alan Evans d9df1ec39e Preparing to target API 28. 2019-06-27 16:18:53 -04:00
Greyson Parrelli abcd599ad8 Support Android Q call notifications. 2019-06-27 15:46:13 -04:00
Greyson Parrelli 8a3d0dde91 Bump compileSdk to 29. 2019-06-27 15:46:13 -04:00
Alan Evans 0f3de6c979 Check action mode is still valid.
Due to support library bug, onActionItemClicked can be called after finish/onDestroyActionMode so we can check for that by checking if our reference to the action mode is still valid.

Fixes #8891
2019-06-27 15:44:05 -04:00
Alan Evans c089d6cd43 Allow multiple messages on the Generic Foreground Service. Show the oldest still active. 2019-06-27 12:18:52 -04:00
Alan Evans cfcb9a8cdb Custom place picker to replace places SDK. 2019-06-27 12:14:54 -04:00
Matthias Riedl 83479d11b7 White text on dark theme pin input.
Fixed #7509
2019-06-27 11:28:59 -04:00
Greyson Parrelli 73b8f11b5a Improve camera capture with CameraX. 2019-06-26 18:11:49 -04:00
Greyson Parrelli 4593014d00 Bump version to 4.42.3 2019-06-24 12:55:02 -04:00
Greyson Parrelli 2cf5d57454 Updated language translations. 2019-06-24 12:54:37 -04:00
Greyson Parrelli 048d859881 Handle missing profile photos better.
There were a couple funny behaviors you could run into if you had a
contact that previously had a profile photo, but then removed it.
2019-06-24 12:36:05 -04:00
Greyson Parrelli 1df28c6564 Bump version to 4.42.2 2019-06-20 09:35:20 -04:00
Greyson Parrelli f59e937006 Updated language translations. 2019-06-20 09:34:38 -04:00
Greyson Parrelli 5948b46ac7 Fix crash in AvatarImageView. 2019-06-20 09:27:58 -04:00
Greyson Parrelli 75b232bfdc Bump version to 4.42.1 2019-06-19 13:01:58 -04:00
Greyson Parrelli 9e6594cc0b Updated language translations. 2019-06-19 12:56:56 -04:00
Greyson Parrelli 7f85b61e89 Serialize RotateSignedPreKeyJob. 2019-06-19 12:56:56 -04:00
Alan Evans 1a32bc8232 Fix flickering avatar. 2019-06-19 12:29:15 -04:00
Greyson Parrelli e603162ee7 Bump version to 4.42.0 2019-06-17 13:51:16 -04:00
Greyson Parrelli 08eca5d844 Updated language translations. 2019-06-17 13:51:16 -04:00
Greyson Parrelli 1d1dbcf9cd Fix RecyclerView lint errors. 2019-06-17 13:51:16 -04:00
Alan Evans e6b107fa78 Add a content description for the inline add attachment button.
Fixes #8730
2019-06-17 13:51:16 -04:00
Alan Evans 284cca3e25 Prevent reply and mark as read abilities while Signal is locked.
Fixes #8874
2019-06-17 13:51:16 -04:00
Greyson Parrelli 1e0b0d926a Update libsignal to 2.13.4 2019-06-17 13:51:16 -04:00
Alan Evans cb86be578b Handle accented characters in country name sorting.
Closes #8419
2019-06-17 13:51:16 -04:00
Alan Evans b8bb2b78bd Query total memory just once.
Closes #8315
2019-06-17 13:51:16 -04:00
Alan Evans 6fceb25121 Take typing indicator into account when moving to quoted message.
Fixes #8858

And fixes same bug in search.
2019-06-17 13:51:16 -04:00
Alan Evans 0484047b4e Fix avatar removal. 2019-06-17 13:51:16 -04:00
Alan Evans b9a10653f1 Image Editor - Multi-line text.
* Two pass rendering for text on top while editing.
2019-06-17 13:51:16 -04:00
Alan Evans 42a5504f0d Do not attempt to retrieve a profile when it is not a number.
Fixes #8855
2019-06-17 13:51:16 -04:00
Alan Evans ae784db80d Video is initially disabled.
Fixes #8867
2019-06-17 12:52:42 -04:00
Alan Evans f5cbf64ccf Fix initial visibility of scroll to bottom button.
Fixes #8862
2019-06-17 12:52:42 -04:00
Alan Evans cecf16c595 Do not show contact address in subtitle. 2019-06-17 12:52:42 -04:00
Greyson Parrelli fb4c9d3bf1 Improve message download reliability. 2019-06-17 12:52:43 -04:00
Greyson Parrelli b5aa46bb67 Convert to AndroidX. 2019-06-17 12:52:42 -04:00
Greyson Parrelli 2dc68ed053 Switch from compile to implementation. 2019-06-17 12:52:42 -04:00
Greyson Parrelli 58d818923d Convert /res folder to webp.
Used lossless.
2019-06-17 12:52:42 -04:00
Greyson Parrelli f4a6cd9c68 Convert emoji to webp.
Used lossy at 99% quality. No perceivable degredation at max font size,
but a pretty big improvement in size over lossless.
2019-06-17 12:52:42 -04:00
Greyson Parrelli ed04535537 Convert image editor stickers to webp.
Used lossless.
2019-06-17 12:52:42 -04:00
Greyson Parrelli 7d4de3d4cb Removed some unused resources. 2019-06-17 12:52:42 -04:00
Greyson Parrelli bc7cc306cb Bump version code to 4.41.6 2019-06-11 01:52:52 -04:00
Greyson Parrelli 5fa07e7094 Improve network reliability. 2019-06-11 01:51:46 -04:00
Greyson Parrelli 2b069fa63f Bump version to 4.41.5 2019-06-07 16:53:48 -04:00
Greyson Parrelli 99848f98d3 Sanitize sticker URL inputs. 2019-06-07 16:08:33 -04:00
Greyson Parrelli 967e9dd9a7 Disable sticker pack sharing. 2019-06-07 16:08:29 -04:00
Greyson Parrelli 4a720289e2 Bump version to 4.41.4 2019-06-06 10:56:52 -04:00
Greyson Parrelli 86d58e97cf Updated language translations. 2019-06-06 10:56:04 -04:00
Greyson Parrelli bc6b7d15f1 Fix number formatting issue. 2019-06-06 10:41:37 -04:00
Greyson Parrelli 37f3b1f1ba Bump version to 4.41.3 2019-06-04 03:35:14 -04:00
Greyson Parrelli 262012887c Revert "Do not show contact address in subtitle."
This reverts commit dae0d30367.
2019-06-04 03:30:24 -04:00
Greyson Parrelli d2cb6098fc Bump version to 4.41.2 2019-06-03 18:58:38 -04:00
Greyson Parrelli 1973fbf376 Fix programmatic VectorDrawable references.
Have to be careful with pre-21 devices. You have to use specific
compat loading methods with VectorDrawables or it'll crash.
2019-06-03 18:53:18 -04:00
Greyson Parrelli bd63b9bec9 Updated language translations. 2019-06-03 14:50:15 -04:00
Greyson Parrelli faa8c78f8d Clean up string for translators. 2019-06-03 14:46:51 -04:00
Greyson Parrelli 923016f12c Fix backup restore crash.
Fixes #8011
2019-06-03 14:06:55 -04:00
Greyson Parrelli f469ce049d Bump version to 4.41.1 2019-05-30 20:22:54 -04:00
Greyson Parrelli 922f6d89e9 Render placeholders for unsupported messages. 2019-05-30 20:18:53 -04:00
Greyson Parrelli 4741a76f37 Add support for isRecipientUpdate flag. 2019-05-30 20:16:14 -04:00
Alan Evans d197c57c55 Gradle witness - Do not hide resolution errors. 2019-05-30 20:22:03 -03:00
Greyson Parrelli 4ee60bf867 Fix bug where you couldn't forward albums. 2019-05-30 16:17:45 -04:00
Alan Evans 4351578838 Darker nav bar. 2019-05-30 17:11:56 -03:00
Greyson Parrelli 56c17e32f1 Bump version to 4.41.0 2019-05-30 01:17:07 -04:00
Alan Evans 48698381fc Dark theme navigation bar.
Fixes #8758
2019-05-30 01:10:10 -04:00
Alan Evans 5ad02f724c Enable 64-bit.
* Multiply version codes by 10 and add a code for each abi in order to generate different version codes for the play store.
2019-05-30 01:08:01 -04:00
Alan Evans 132c81b142 Bring Gradle Witness into repo.
- Api/Implementation compatible.
- Regex configuration name.
2019-05-30 01:08:01 -04:00
Greyson Parrelli 77e3cc40e0 Fix message bubble sizing with link previews and quotes.
Previously, quotes could extend beyond the width of the link preview
banner image. Now quotes will be constrained to the size of the link
preview banner image.
2019-05-30 01:08:01 -04:00
Greyson Parrelli 2a644437fb Add sticker support.
No sticker packs are available for use yet, but we now have the
latent ability to send and receive.
2019-05-30 01:08:01 -04:00
Alan Evans d5fffb0132 Fix conversation menu colors. 2019-05-28 17:36:07 -03:00
Alan Evans c8c152fe60 Lint - baseline of errors.
* qa task calls lint.
2019-05-28 17:36:07 -03:00
Alan Evans 350d1f47d3 Give conversation a standard navigate up button.
* Prevent a failing IDE preview.
2019-05-28 17:36:07 -03:00
Alan Evans 2ae42cb095 Hide local video when toggled on and off.
Fixes #8827
2019-05-28 17:36:07 -03:00
Alan Evans dae0d30367 Do not show contact address in subtitle. 2019-05-23 16:57:50 -03:00
Alan Evans e5f70bdbda End RTC call on incoming PSTN call.
* Hangs up when new device call is answered.
* Ensure not on a device call when starting a Signal call.
2019-05-23 16:56:05 -03:00
Alan Evans 156fe37a60 Get SubscriptionManager by name due to ContextCompat bug for API 22.
Fixes #8826
2019-05-23 11:38:24 -03:00
Alan Evans 56848fb83d Replace sgnl.link urls with a more readable url.
* Taken out random string, reverted to single "Let's switch".

#8767
2019-05-23 08:02:15 -03:00
Alan Evans 3cba8ab58a Keep system default SIM as a fallback for when no conversation default SIM.
Fixes #8452
2019-05-22 16:59:00 -03:00
Alan Evans 88dac70087 Lint - Custom Widgets extend Appcompat Widgets. 2019-05-22 14:02:21 -03:00
Alan Evans 9445555d66 Code analysis - address @NotNull/@Nullable issues. 2019-05-22 13:51:56 -03:00
Alan Evans 7db1588578 Do not assume phone number in conversation.
Fixes #8813
2019-05-22 13:30:27 -03:00
Alan Evans 0a7970ad0c Image Editor - Allow undoing back to the original state when exceeds the undo limit. 2019-05-22 13:28:02 -03:00
Alan Evans 10ad3fbf82 Lint - Use easily identifiable wake lock tags. 2019-05-20 13:24:34 -03:00
Alan Evans 95858898d7 Lint - avoid calling a restricted API. 2019-05-20 13:24:33 -03:00
Alan Evans 16c8cc88d7 Update visibility and icon of camera flip control in call.
Fixes #8221
2019-05-20 13:24:33 -03:00
Greyson Parrelli c0c051bb66 Bump version to 4.40.4 2019-05-20 08:31:47 -07:00
Greyson Parrelli bd0d1e842f Updated language translations. 2019-05-20 08:28:28 -07:00
Alan Evans 7f0c998b24 Image Editor - Further crop improvements.
* Thumb accuracy improved.
* When out of bounds from drag, try to fix by adjusting translation.
* Update undo state when listener changes.
2019-05-20 12:02:40 -03:00
Greyson Parrelli 5a4c2fc7b0 Bump version to 4.40.3 2019-05-17 15:56:50 -07:00
Alan Evans 456ba5fa02 Image Editor - Replace minimum scale, with minimum pixel count.
- Anti alias images.
- Minimum crop ratio of 15:1 or original image ratio.
2019-05-17 19:42:12 -03:00
Alan Evans 9de420fde6 Image Editor - On flip or rotate, ensure undo button visibility is updated. 2019-05-17 19:00:10 -03:00
Alan Evans 401e3687de Image Editor - when no sticker selected, go back to mode NONE. 2019-05-17 16:22:07 -03:00
Alan Evans 6777b3e0e6 Image Editor - Undo button visibility. 2019-05-17 16:15:27 -03:00
Greyson Parrelli b5d37702f9 Switch back to the classic handling of landscape text entry.
Fixes #8814
2019-05-17 12:14:14 -07:00
Greyson Parrelli 320ea9eb4e Bump version to 4.40.2 2019-05-16 16:23:19 -07:00
Greyson Parrelli 86d8cde9b4 Updated language translations. 2019-05-16 16:22:32 -07:00
Alan Evans bf759711ef Image Editor - Keep image within crop bounds.
* 4% of original pixels must be visible.
* The entire crop must be within the image.
* On release, try to scale crop area and image to fit if the crop is invalid.
* Undo to last valid position if that didn't work.
* Additionally, center thumbs now do not respect aspect ratio lock.
2019-05-16 15:52:15 -07:00
Alan Evans 068ffc2167 Image Editor - Allow undoing during croping. 2019-05-16 15:52:03 -07:00
Alan Evans 95304fe001 Image Editor - Remove initial text.
- Flashing cursor.
2019-05-16 15:51:56 -07:00
Alan Evans 2de64fca02 Image Editor - Fix double HUD animation on older devices. 2019-05-16 15:51:41 -07:00
Greyson Parrelli 3211dd2a8f Ignore resources.arsc in apkdiff.py
Due to a bug described in:

https://issuetracker.google.com/issues/110237303

Ordering of resources can be non-deterministic.

A comment on the issue indicates that this may be resolved in
Android Gradle Plugin 3.4. We should revisit when we update.
2019-05-11 10:46:25 -07:00
Peter Gerber b6dc25a368 Reproducible build: Ensure apkdiff.py works properly again
The recent switch to Python3 (2ccdf0e396) introduced a regression
that led to file content no longer being compared:

   In compareEntries(), two generators/iterators are created:

     sourceInfoList      = filter(lambda sourceInfo: …, sourceZip.infolist())
     destinationInfoList = filter(lambda destinationInfo: …, destinationZip.infolist())

   Few lines later, those are exhausted:

     if len(sourceInfoList) != len(destinationInfoList):

   Yet another few lines later, the exhausted generator is used again:

     for sourceEntryInfo in sourceInfoList:
        …          # <-- unreachable

This is caused by behavioral differences between Python2 and Python3:

   user@z_signal:~$ python2
   Python 2.7.13 (default, Sep 26 2018, 18:42:22)
   [GCC 6.3.0 20170516] on linux2
   Type "help", "copyright", "credits" or "license" for more information.
   >>> f = filter(lambda i: i % 2 == 0, [0, 1, 2, 3, 4, 5, 6])
   >>> list(f)
   [0, 2, 4, 6]
   >>> list(f)
   [0, 2, 4, 6]
   >>>

   user@z_signal:~$ python3
   Python 3.5.3 (default, Sep 27 2018, 17:25:39)
   [GCC 6.3.0 20170516] on linux
   Type "help", "copyright", "credits" or "license" for more information.
   >>> f = filter(lambda i: i % 2 == 0, [0, 1, 2, 3, 4, 5, 6])
   >>> list(f)
   [0, 2, 4, 6]
   >>> list(f)
   []
   >>>
2019-05-11 10:43:51 -07:00
Greyson Parrelli 4e64242883 Bump version to 4.40.1 2019-05-10 13:08:49 -07:00
Greyson Parrelli fcd3b501eb Revert "Enable 64-bit."
This reverts commit 67704612df.
2019-05-10 13:01:34 -07:00
Greyson Parrelli 62ed098687 Bump version to 4.40.0 2019-05-10 09:35:11 -07:00
Greyson Parrelli 2a93ddfb99 Updated language translations. 2019-05-10 09:19:39 -07:00
Alan Evans 387392f38b End align footer for long message bubble sent.
Fixes #8806
2019-05-10 12:41:15 -03:00
Alan Evans 5b298b4a04 Resize image in attempts to get it to fit into the maxImageSize bytes.
Fixes #8803
2019-05-10 12:16:19 -03:00
Alan Evans cb78684282 Ensure push groups cannot have isForceSmsSelection set.
Fixes #8807
2019-05-10 12:13:59 -03:00
Alan Evans 67704612df Enable 64-bit. 2019-05-10 12:03:45 -03:00
Alan Evans f3c8b51520 Web RTC M74 for 64-bit. 2019-05-10 12:03:16 -03:00
Alan Evans b1057d63a1 Lint.
- Check for permissions.
- Fix Welsh positional format.
- Remove UIThread restriction.
- Asynchronous method does not need to be restricted to UIThread and there is no StaticFieldLeak to suppress.
- Fix or Ignore New API errors.
- Reduce severity of some errors from L10N.
2019-05-10 11:57:43 -03:00
Alan Evans 2ccdf0e396 Bring the Reproducible Builds instructions and script into repo. 2019-05-10 11:57:43 -03:00
Alan Evans 93e6ccb9e4 Replace image editor. 2019-05-10 11:57:43 -03:00
Alan Evans 196ef60a82 Update camera icons. 2019-05-09 14:38:28 -03:00
Alan Evans 478e5667b4 Update signal-service-android to 2.13.1 for 64-bit curve-25519. 2019-05-09 14:38:28 -03:00
Alan Evans 06ea000f42 Repeat count for format args of plural string.
Fixes #8724
2019-05-07 12:26:01 -03:00
Alan Evans d1b8e77fdc Always show the SIM on the footer of a multi-SIM device, even if one SIM is disabled. 2019-05-07 12:25:11 -03:00
Alan Evans 8cf2654c5b Show reply method SMS/Signal and respect sticky.
Fixes #8792
2019-05-06 16:45:30 -07:00
Alan Evans 18531146f7 Update the sticky EventBus message to reflect changes in microphone enabled state.
Fixes #7827
2019-05-06 16:45:30 -07:00
Jeffrey Griffin c274c1bb28 Eliminate noisy directory feedback
We observed IOExceptions loading the Contact Discovery IAS KeyStore. We will now throw an AssertionError upon any error
creating the IAS KeyStore, matching the behaviour for creation of the TrustStore used for the main Signal Service. NB: If
this assertion is hit, the user will not even be able to refresh their contacts with the old directory service.
2019-05-06 16:45:30 -07:00
Alan Evans 42a8522e98 Manually call the onPageSelected when entering page 0.
Fixes #7610
2019-05-06 16:45:30 -07:00
Greyson Parrelli 960e165c7d Bump version to 4.39.4 2019-05-06 15:51:10 -07:00
Greyson Parrelli eab23a9e66 Fixed issue where giphy results weren't loading. 2019-05-06 15:48:43 -07:00
Greyson Parrelli c7b626082c Bump version to 4.39.3 2019-05-06 12:31:59 -07:00
Greyson Parrelli 59f362495a Add additional checks around link preview domains.
We never make requests to non-whitelisted domains, but there were
situations where some links would redirect to non-whitelisted domains,
which would hit a final failsafe that resulted in a crash.

To prevent this, we detect bad redirects earlier and fail more
gracefully.

Fixes #8796
2019-05-06 12:25:53 -07:00
Greyson Parrelli 6c44437c6f Bump version to 4.39.2 2019-05-02 15:38:25 -07:00
Greyson Parrelli fed8ae68e9 Updated language translations. 2019-05-02 15:32:44 -07:00
Greyson Parrelli 934a2a67bc Fix some keyboard issues in landscape. 2019-05-02 14:32:53 -07:00
Greyson Parrelli 05345b8582 Remove some unnecessary logging. 2019-05-02 14:32:53 -07:00
Greyson Parrelli cef5de2be4 Removed unnecessary WorkManager relic. 2019-05-02 14:32:53 -07:00
Greyson Parrelli 7b4299d5da Bring back conscrypt, improve provider initialization ordering. 2019-05-02 14:32:48 -07:00
Alan Evans ec20b0e0e3 Fallback to SIM index.
#8725
2019-05-02 18:16:59 -03:00
Greyson Parrelli ff1531b836 Bump version to 4.39.1 2019-05-01 08:42:49 -07:00
Greyson Parrelli 1675c8a79a Updated language translations. 2019-05-01 08:42:44 -07:00
Greyson Parrelli bb90987e7c Fix potential crash when retrieving SIM list. 2019-05-01 08:36:24 -07:00
Greyson Parrelli ecea6abeb6 Temporary revert (again) to fix an avatar retrieval issue.
This reverts commit 77524ae1f2.
2019-05-01 08:25:14 -07:00
Greyson Parrelli 4a2f3136c6 Bump version to 4.39.0 2019-04-30 12:51:58 -07:00
Greyson Parrelli d12b02fac5 Updated language translations. 2019-04-30 12:51:58 -07:00
Greyson Parrelli 1e564b6ad1 Fix exponential backoff retry limits. 2019-04-30 12:51:58 -07:00
Alan Evans c77daa8226 Display carrier or number if any SIM descriptions clash.
Fixes #8725
2019-04-30 12:51:58 -07:00
Alan Evans fa35814344 Disable transport disables all matching TransportOptions.
Fixes #8744
2019-04-30 12:51:58 -07:00
Alan Evans 48efcaa785 Do not list SIMs that are not ready.
Fixes #8426
2019-04-30 12:51:58 -07:00
Greyson Parrelli f3f6cc87d9 Request a small chunk instead of HEAD for images of unknown size. 2019-04-30 12:51:58 -07:00
Greyson Parrelli 29cdb5290b Make headers for giphy requests random sizes. 2019-04-30 12:51:58 -07:00
Greyson Parrelli 77524ae1f2 Revert "Temporary revert to fix an avatar retrieval issue."
This reverts commit 267bc32e23.
2019-04-30 12:51:58 -07:00
Greyson Parrelli 30ba9d7e27 Improve CDN reliability. 2019-04-30 12:51:58 -07:00
Alan Evans 9652fd2844 Update MMS configs. 2019-04-30 12:51:58 -07:00
Francois Blackburn d2ece1c1f2 Add MI 5 to hardware AEC blacklist 2019-04-30 12:51:57 -07:00
Arnt Gulbrandsen 8bdc257963 Avoid hardware echo cancellation for Fairphone FP2
The issue has as been confirmed by me with the stock ROM as of November
2018, and other users have complained for almost 18 months, see
https://forum.fairphone.com/t/fnord/28849 and
https://bugtracker.fairphone.com/project/fairphone-fairphone-os-android-6/issue/77
2019-04-30 12:51:57 -07:00
Kevin Mark 88f9ec313f Close SQL statement, preventing finalizer crashes
This will stop instances of the following from occuring in the logs
on SMS migration:

W/SQLiteCompiledSql: Releasing statement in a finalizer. Please ensure
that you explicitly call close() on your cursor: INSERT INTO sms
(address, person, date_sent, date, protocol, read, status, type,
reply_path_present,
    net.sqlcipher.database.DatabaseObjectNotClosedException: Application did not close the cursor or database object that was opened here
        at net.sqlcipher.database.SQLiteCompiledSql.<init>(SQLiteCompiledSql.java:62)
        at net.sqlcipher.database.SQLiteProgram.<init>(SQLiteProgram.java:109)
        at net.sqlcipher.database.SQLiteStatement.<init>(SQLiteStatement.java:39)
        at net.sqlcipher.database.SQLiteDatabase.compileStatement(SQLiteDatabase.java:1647)
        at org.thoughtcrime.securesms.database.SmsDatabase.createInsertStatement(SmsDatabase.java:767)
        at org.thoughtcrime.securesms.database.SmsMigrator.migrateConversation(SmsMigrator.java:166)
        at org.thoughtcrime.securesms.database.SmsMigrator.migrateDatabase(SmsMigrator.java:210)
        at org.thoughtcrime.securesms.service.ApplicationMigrationService$ImportRunnable.run(ApplicationMigrationService.java:159)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
        at java.lang.Thread.run(Thread.java:764)

We aren't closing Statement objects before the finalizer on those
objects runs. When the GC runs, we'll get warnings like the above
which alert us to the fact that these objects are being automatically
closed for us in the finalizer, but that this is suboptimal behavior.

If we leave too many Statement (or Cursor) objects to be closed in
their finalizers, when the GC runs, it'll take longer than 10 seconds
to close them all and Android will kill the app. This 10 second limit
is hardcoded and we can only try to avoid it. A crash will look like:

java.util.concurrent.TimeoutException: net.sqlcipher.database.SQLiteCompiledSql.finalize() timed out after 10 seconds
    at java.lang.Object.wait(Native Method)
    at java.lang.Thread.parkFor$(Thread.java:1220)
    at sun.misc.Unsafe.park(Unsafe.java:299)
    at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:810)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(AbstractQueuedSynchronizer.java:844)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:1173)
    at java.util.concurrent.locks.ReentrantLock$FairSync.lock(ReentrantLock.java:196)
    at java.util.concurrent.locks.ReentrantLock.lock(ReentrantLock.java:257)
    at net.sqlcipher.database.SQLiteDatabase.lock(SQLiteDatabase.java:553)
    at net.sqlcipher.database.SQLiteCompiledSql.releaseSqlStatement(SQLiteCompiledSql.java:106)
    at net.sqlcipher.database.SQLiteCompiledSql.finalize(SQLiteCompiledSql.java:152)
    at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:202)
    at java.lang.Daemons$FinalizerDaemon.run(Daemons.java:185)
    at java.lang.Thread.run(Thread.java:818)

I was able to replicate the above crash consistently on a
Samsung Galaxy S7 edge when importing well over 100k SMS messages.
But as soon as I attached a debugger the crash did not persist. I
assume this is because of some VM-level interactions between the two
and did not investigate further after fixing it.

I do not have access to the stack trace for issue #7953 but this
could potentially resolve it. The crash is identical to that in #7477
but this patch is for SMS migration not restoring from a backup. I
was not able to replicate the crash on restoring a >100k message
backup.
2019-04-30 12:51:57 -07:00
Michael Walker 8ad5126408 Add pinterest domain and asset domains for link preview support 2019-04-30 12:51:57 -07:00
Greyson Parrelli 1e27847015 Update link preview meta tag regex. 2019-04-30 12:51:57 -07:00
Greyson Parrelli e67eca77ff Prevent landscape text editing from taking over the screen.
It used to be that we let Android do the default behavior of
full-screening the EditText when in landscape, but honestly I
don't know who prefers that. So I've turned it off.

Fixes #8769
2019-04-30 12:51:52 -07:00
Greyson Parrelli ba46a9d81a Bump version to 4.38.3 2019-04-28 11:44:23 -07:00
Greyson Parrelli 49cccc6927 Update job logging. 2019-04-28 11:44:17 -07:00
Greyson Parrelli 5977e9141d Wrap transactions in try-finally. 2019-04-28 11:42:02 -07:00
Greyson Parrelli c0982293bf Fix bug where sticky SMS setting wasn't respected.
Fixes #8783
2019-04-28 11:34:56 -07:00
Greyson Parrelli ae6ef62160 Bump version to 4.38.2 2019-04-16 10:56:59 -04:00
Greyson Parrelli d95b08d4fd Updated language translations. 2019-04-16 10:51:25 -04:00
Greyson Parrelli 128da6db04 Fix crash in backup restore related to sqlite_sequence.
The new JobManager stuff created a table that had an
auto-incrementing ID, which was incorrectly being backed
up and restored, causing a crash. Now we skip it on both
import and export.
2019-04-16 10:10:02 -04:00
Greyson Parrelli 2701607810 Reduce the possible number of unique jobs to avoid crash.
Some devices have a limit of 100 unique JobScheduler jobs.
Previously we allowed up to 1,000. Given that we just need
_some_ job running, I lowered the limit to 75 to give us
some head room.
2019-04-16 09:52:12 -04:00
Greyson Parrelli 4055fe183b Bump version to 4.38.1 2019-04-15 15:45:16 -04:00
Greyson Parrelli 1c47812877 Fix crash when migrating read receipt jobs.
Fixes #8764
2019-04-15 15:45:16 -04:00
Greyson Parrelli 060bed8559 Bump version to 4.38.0 2019-04-15 10:59:38 -04:00
Greyson Parrelli 4a3c173adb Migrated to new JobManager. 2019-04-15 10:56:26 -04:00
Greyson Parrelli 8cf3ba424a Trim long text before displaying if necessary.
Fixes #8759
2019-04-15 10:13:35 -04:00
Alan Evans 9c40de5bf1 Save the SMS setting on a per-conversation basis. 2019-04-15 10:13:35 -04:00
Greyson Parrelli 11a2ed0743 Increase reliability of locally logging crashes.
Exception logging tends to be race-y, so now we block and wait
for all logs to be written before continuing with the crash.
2019-04-10 12:53:55 -04:00
Alan Evans 01a9931d92 Do not use background threads for download UI events. 2019-04-10 13:13:10 -03:00
Greyson Parrelli 38bcc6c293 Long text detail view now respects text size preference.
Fixes #8747
2019-04-09 09:40:32 -04:00
Greyson Parrelli bceb9b4972 Fixed quotes not being cleared when forwarding.
Fixes #8748
Fixes #7935
2019-04-09 09:35:47 -04:00
Alan Evans ecdc285378 Fix unresponsive button on image send with text in landscape.
Fixes #8575
Closes #8638

Co-authored-by: Jakub Gregorek <jg@inthemeadow.net>
2019-04-08 07:45:16 -03:00
Greyson Parrelli 6d111e5f68 Bump version to 4.37.2 2019-04-04 23:18:30 -04:00
Greyson Parrelli 9aed2343c1 Attempt to resolve connectivity problems for some users. 2019-04-04 18:10:41 -04:00
Greyson Parrelli 733d54e339 Linkify links in long message view.
Fixes #8735
2019-04-04 10:09:32 -04:00
Greyson Parrelli 267bc32e23 Temporary revert to fix an avatar retrieval issue.
This reverts commit 8aa185070b.
2019-04-03 16:32:52 -04:00
Greyson Parrelli 7acb4973d8 Bump version to 4.37.1 2019-04-01 17:29:26 -04:00
Alan Evans 39ba8c2ad3 Remove armeabi from splits. 2019-04-01 17:43:10 -03:00
Alan Evans 621ac62c7e Add red flashing voice note microphone. 2019-04-01 17:42:57 -03:00
Greyson Parrelli 652306edd0 Bump version to 4.37.0 2019-03-29 09:55:09 -07:00
Alan Evans b9b4dccff4 ABI splits. 2019-03-28 17:21:57 -03:00
Alan Evans ce6d2d9c69 MMS image quality.
Fixes #8590
- Scale image larger within the dimensions.
- Apply a minimum dimension of 1024.
2019-03-28 15:14:06 -03:00
Alan Evans e842f78457 Voice Note Locking.
Limit of 60 minutes, after which it's cancelled.
2019-03-28 15:04:38 -03:00
Alan Evans cab3657ab0 ABI info for device. 2019-03-26 17:29:08 -03:00
Alan Evans a7aa980e58 New dynamic locale system.
- Fixes #7619
2019-03-26 17:08:05 -03:00
Alan Evans 6a0a419f0c Add self to MMS group.
- Fixes #7683
- Closes #8296
2019-03-26 17:07:04 -03:00
Greyson Parrelli 94e8303022 Remove dead code from ScribbleHud/Fragment. 2019-03-22 12:47:16 -07:00
Greyson Parrelli ccfcfa71df Enable the sending of long messages. 2019-03-22 12:28:41 -07:00
Alan Evans cfdcd61e51 Local build quality assurance task. 2019-03-21 11:19:07 -07:00
Greyson Parrelli b89c20ff40 Switch to 'start' and 'end' instead of 'left' and 'right'.
We can do this now that our minSdk is 19.
2019-03-21 11:19:06 -07:00
Greyson Parrelli 8caaf057e8 Remove unnecessary pre-19 code branches.
Now that our minSdk is 19, we can remove a lot of old code paths that
only ran pre-19.
2019-03-21 11:19:06 -07:00
Moxie Marlinspike a52c295a38 Simplify access to SecureRandom
This shouldn't matter at all, but it's more "correct," and shows
my age less.
2019-03-21 11:19:06 -07:00
Moxie Marlinspike 8aa185070b Update libsignalservice to 2.13.0
- Eliminate the explicit spongycastle dependency. All access to
  primitives is done through the JCE interfaces now, which allows
  us to use a secure native-backed provider like conscrypt.

- Use conscrypt for our default security provider. This gives us
  fast TLS 1.2 and 1.3 support on all devices, even before they
  had platform support (like 4.4).

- Update minSdk to 18. Unfortunately the JCE interfaces for GCM
  primitives are JDK 7+ (!) only, which became supported by Android
  at 18.
2019-03-21 11:19:06 -07:00
Alan Evans de60d4d37f 64-bit native utils.
* Update Application.mk.
* 64-bit libnative-utils
* New build of x86 and armeabi-v7a libnative-utils.
* Update to API19.
2019-03-21 11:19:06 -07:00
Alan Evans 6e5658431b Remove armeabi. 2019-03-21 11:19:06 -07:00
Greyson Parrelli 6df5457305 Bump minSdk to 19. 2019-03-21 11:19:06 -07:00
Greyson Parrelli fd50b38630 Bump version to 4.36.2 2019-03-21 11:02:12 -07:00
Alan Evans d41b24f9ae Fix "multiple substitutions specified in non-positional format" lint. 2019-03-21 11:02:12 -07:00
Greyson Parrelli aa5e32f0ee Add back the highlight and sticker tools. 2019-03-21 11:02:07 -07:00
Greyson Parrelli 749d096931 Updated language translations. 2019-03-21 09:57:12 -07:00
Greyson Parrelli 8e86c7d81a Fix media button visibility issue on older Android versions.
Turns out setVisibility doesn't work unless you call clearAnimation()
first on older Android versions. Isn't that grand?
2019-03-21 00:11:01 -07:00
Greyson Parrelli 148cfd1b53 Fix crash when single-selecting large media. 2019-03-20 23:01:32 -07:00
Greyson Parrelli 93c1277fd0 Fix voice note button clipping. 2019-03-20 22:25:19 -07:00
Greyson Parrelli 23e069ffa8 Bump version to 4.36.1 2019-03-19 19:27:29 -07:00
Greyson Parrelli 6e7fab40ac Guard against OOB moves in media send flow. 2019-03-19 18:38:06 -07:00
Greyson Parrelli 8a7cac7c03 Switch gallery to permanent dark theme. 2019-03-19 18:38:06 -07:00
Greyson Parrelli 932e7b4af5 Fix button flicker when selecting single media item. 2019-03-19 18:38:02 -07:00
Greyson Parrelli 2f8a7fa296 Bounce the media select button when selecting media. 2019-03-19 15:42:08 -07:00
Greyson Parrelli 5e6f71cd32 Show selection order in multi-select. 2019-03-19 15:42:08 -07:00
Greyson Parrelli ce0058864f Make BlobProvider write to disk on a background thread.
Otherwise we hit some weird blocking issues with voice note recording.
2019-03-19 15:34:04 -07:00
Greyson Parrelli 5a8753de85 Fix group string. 2019-03-19 10:34:56 -07:00
Greyson Parrelli c646316a97 Block typing indicators from blocked contacts. 2019-03-19 09:39:19 -07:00
Greyson Parrelli 6df8988f54 Updated to WebRTC M73. 2019-03-19 09:03:02 -07:00
Greyson Parrelli 5b534c8b1a Update URL homograph rules. 2019-03-18 17:37:19 -07:00
Greyson Parrelli ab2e85f6c7 Bump version to 4.36.0 2019-03-18 15:10:13 -07:00
Greyson Parrelli 975a121c55 Show a warning for users on API < 19.
We'll be updating minSdk to 19 in 4.37. This lets these users continue
to use the app, but they'll be warned with a persistent banner saying
that they can't receive updates.
2019-03-18 15:09:56 -07:00
Greyson Parrelli 64cf032181 Updated media send UI. 2019-03-18 15:09:56 -07:00
Alan Evans d8a56be5e8 Gradle/Gradlew/AndroidGradlePlugin update. 2019-03-18 15:09:56 -07:00
Alan Evans 286b64274c Replace Avatar Cropper. 2019-03-18 15:09:50 -07:00
Alan Evans 0cb2404735 Lint error fixes.
* Old Gingerbread code removed.
* Add missing super call.
2019-03-18 11:14:18 -03:00
Greyson Parrelli 0a8bbf14a6 Merge camera into send flow. 2019-03-14 16:25:35 -07:00
Greyson Parrelli eb1dd58a0b Persistent media in multi-send. 2019-03-14 16:20:36 -07:00
Alan Evans a79df7d815 Automatic resConfig.
- Test to ensure language_entries list matches exactly the available resources.
2019-03-14 13:33:43 -03:00
Alan Evans e0c11998c3 Make DisplayRecord take context as argument, so locale is more likely to be correct. 2019-03-13 18:28:16 -03:00
Alan Evans de72eceecf Update help URL to avoid redirect. 2019-03-13 18:19:33 -03:00
Alan Evans c46e53ab24 Add Esperanto and Swahili (Kiswahili) to language selection. 2019-03-13 17:45:53 -03:00
Alan Evans 2c28fa6a57 Make GIF search layout option sticky.
Fixes #7843
2019-03-12 11:41:54 -03:00
Alan Evans f010a3ec0d Consistent Recipient to add contact Intent export. 2019-03-12 11:29:59 -03:00
Alan Evans e390fb4fc5 Fix ShareMessage toolbar back button. 2019-03-12 11:29:59 -03:00
Greyson Parrelli a4ce77cbcc Remove unused method. 2019-03-12 11:29:59 -03:00
Greyson Parrelli 18613e3b6f Remove generic foreground service condition from Job.
I don't think it actually helps at all, meaning it just adds
complexity.

Fixes #8677
2019-03-12 11:29:59 -03:00
Greyson Parrelli 278fdebf43 Update WorkManager to 1.0.0. 2019-03-12 11:29:59 -03:00
Greyson Parrelli a122bb4899 Created new BlobProvider.
One unified place to create blobs for different lifespans.
2019-03-10 15:18:39 -07:00
Greyson Parrelli 22ed8caed3 Bump version to 4.35.3 2019-03-07 17:59:18 -08:00
Greyson Parrelli 8b6ecd1d2e Fixed profile screen layout on small screens.
Fixes #8670
2019-03-07 17:25:02 -08:00
Greyson Parrelli f2703f0b7b Bump version to 4.35.2 2019-03-06 08:12:42 -08:00
Greyson Parrelli 1efb92b913 Fix issue where SMS were sometimes sent as MMS.
Fixes #8664
2019-03-06 08:12:00 -08:00
Greyson Parrelli 5ccf84f7a2 Bump version to 4.35.1 2019-03-02 21:01:15 -08:00
Greyson Parrelli c3368f6de6 Updated language translations. 2019-03-02 20:46:40 -08:00
Greyson Parrelli 77e971cb9b Fix bug where system emoji setting was ignored in message bubbles.
EmojiTextView. It is our gift. It is our curse.
2019-03-02 19:31:28 -08:00
Greyson Parrelli 003fa1b059 Make long text attachments contain the entire message.
Instead of just containing the 'overflow', long text attachments now
contain the entire body in full.
2019-03-02 19:31:22 -08:00
Greyson Parrelli 03aa9e9712 Bump version to 4.35.0 2019-03-01 14:19:21 -08:00
Greyson Parrelli 55699e27bc Added ability to receive long messages.
Send support is in here too. We'll enable it in a future release after
enough people have updated.
2019-03-01 14:15:08 -08:00
Greyson Parrelli bf28e109d3 Update registration UI. 2019-03-01 14:15:01 -08:00
Greyson Parrelli 6b476876d9 Lower volume of call connect/disconnect sound.
It's now closer in amplitude to the ringing sound.

Fixes #8165
2019-03-01 13:44:32 -08:00
Greyson Parrelli fd862e575b Fix situation where search nav could get stuck.
If you navigated to the ConversationActivity again via some action (like
a shared contact invite) while searching, we don't get the toolbar close
event, and therefore the search nav would stay open. Now we just reset
it on newIntent() to be safe.
2019-03-01 13:44:32 -08:00
Greyson Parrelli 7fd6f5b3ff Fix search highlight in multi-whitespace bodies.
The way the highlight was done could get screwed up if you had multiple
whitespaces in a row. This particularly came up with messages with
multiple newlines.
2019-03-01 13:44:32 -08:00
Greyson Parrelli 42e94d8f92 Remove leftover half-height camera code. 2019-03-01 13:44:32 -08:00
Greyson Parrelli b572fce658 Remove some unnecessary intermediate blob creation. 2019-03-01 13:44:32 -08:00
Greyson Parrelli 276e867f9a Improved address resolution for ContentProxySelector.
We can use an unresolved address to avoid all the threading stuff in
that class.
2019-03-01 13:42:10 -08:00
Greyson Parrelli b2d4608cdb Improved handling for URLs that are composed of mixed character sets. 2019-02-24 10:00:44 -08:00
Greyson Parrelli 9d21c36ddf Bump verstion to 4.34.8
Again, no changes. Needed to resubmit to the Play Store.
2019-02-21 18:04:44 -08:00
Greyson Parrelli 983290aa5b Bump version to 4.34.7
No changes. Necessary to resubmit to Google Play.
2019-02-21 12:57:55 -08:00
Greyson Parrelli 88b9fc25d2 Bump version to 4.34.6 2019-02-20 17:23:54 -08:00
Greyson Parrelli 60c7fb0056 Fix possible NPE. 2019-02-20 17:20:12 -08:00
Greyson Parrelli fa6da1902f Fix button spinning after failed CAPTCHA. 2019-02-19 13:13:32 -08:00
Greyson Parrelli 5cc3ac00c7 Bump version to 4.34.5 2019-02-19 09:37:30 -08:00
Greyson Parrelli 33daa21ad9 Guard against devices not supporting mandatory ContentProvider columns.
The docs specify that this column is supposed to be present, but a
crash says it wasn't, so alas, here in goes the check.
2019-02-19 09:34:24 -08:00
Greyson Parrelli c4d1bdc44d Bump version to 4.34.4
No changes. Necessary to resubmit to the Play Store.
2019-02-18 16:03:15 -08:00
Greyson Parrelli ca99c732f8 Bump version to 4.34.3 2019-02-18 11:47:40 -08:00
Greyson Parrelli 1f79808cf0 Remove unneccesary FCM manifest attribute.
`firebase_analytics_collection_enabled` is used for temporarily
enabling/disabling analytics.

We already use `firebase_analytics_collection_deactivated`, which is
used for permanently disabling analytics.
2019-02-18 11:46:53 -08:00
Greyson Parrelli 5c0e1100ed Fix possible NPE in conversation menu.
Would occur if someone had previously muted a conversation with
themselves.
2019-02-16 11:45:09 -08:00
Greyson Parrelli d0b763c16e Bump version to 4.34.2 2019-02-15 19:34:19 -08:00
Greyson Parrelli b962751c96 Fix possible IllegalArgumentException during a database migration. 2019-02-15 19:33:16 -08:00
Greyson Parrelli 94e8553b73 Fix possible NPE during conversation load. 2019-02-15 19:24:23 -08:00
Greyson Parrelli 351b625975 Bump version to 4.34.1 2019-02-15 14:21:27 -08:00
Greyson Parrelli a2b6dbda14 Correctly sync Note to Self conversation color. 2019-02-15 14:21:27 -08:00
Greyson Parrelli a6564f8f84 FCM improvements. 2019-02-15 14:21:23 -08:00
Greyson Parrelli 4dbe165c18 Bump version to 4.34.0 2019-02-14 21:04:01 -08:00
Greyson Parrelli f29a42411e Update WorkManager to beta05. 2019-02-14 20:19:07 -08:00
Greyson Parrelli 02b0800b22 Support requesting a CAPTCHA during registration. 2019-02-14 20:19:07 -08:00
Greyson Parrelli 2cfa431cad Supply a reason for CDS error reporting. 2019-02-14 20:19:07 -08:00
Greyson Parrelli fe4068afce Don't preview links if your cursor is touching them. 2019-02-14 20:19:07 -08:00
Greyson Parrelli 1c23603c25 Add the Redmi Note 5 to the hardware AEC blacklist. 2019-02-14 20:19:07 -08:00
Greyson Parrelli c2a86fcc74 Sync self-sends to desktop.
Updated UI to show self-conversations as "Note to Self".
2019-02-14 20:19:07 -08:00
Greyson Parrelli d42c9b5dbc Ensure the group shortstring in the action bar is up-to-date.
There were situations where adding/removing members from a group
would update the group member list, but the short string (the little
text listing the first couple members of the group) wouldn't be updated
until you left the screen and came back.
2019-02-14 20:19:06 -08:00
Greyson Parrelli 3b6429c163 Don't unnecessarily stop the ShareActivity in onPause.
1. Due to ShareActivity having noHistory=true, it will already be
ditched when you leave the activity.
2. We only need to truly finish() here if we've dropped the underlying
media.

Fixes #8591
2019-02-14 20:19:06 -08:00
Greyson Parrelli 6896f8ea15 Properly check attachment size during media send.
Prevent users from trying to send videos that exceed the size limit.

Also, this commit properly populates height/width on media shared into
the app.

Fixes #8573
2019-02-14 20:19:06 -08:00
Greyson Parrelli a3768c7d74 Fix StickyHeader measuring.
It didn't re-measure when pulling an item from the cache, screwing stuff
up after a phone rotation. Had a workaround for it for specific screens,
but this fixes the problem at the source.

Fixes #8583
2019-02-14 20:19:06 -08:00
Greyson Parrelli c9a0a66f18 Migrate backup passphrase to be keystore-encrypted when available. 2019-02-14 20:19:06 -08:00
Greyson Parrelli db1ad39c6b Fix issues with bundled notifications. 2019-02-14 20:19:06 -08:00
Greyson Parrelli 9f04c28bfd Implemented conversation search.
You can now search for messages within a specific conversation.
2019-02-14 20:19:01 -08:00
Greyson Parrelli 10631d7e71 Add a gradle.properties with increased memory size. 2019-02-14 14:29:12 -08:00
Greyson Parrelli cfff10622a Move conversation classes to their own package. 2019-02-14 14:29:12 -08:00
Greyson Parrelli b769c7d9b6 Properly batch contact inserts.
Fixes #8580
2019-02-14 14:29:12 -08:00
Greyson Parrelli 1e0f691a56 Updated to WebRTC M72. 2019-02-14 14:28:57 -08:00
Greyson Parrelli f0852d1d39 Bump version to 4.33.5 2019-02-07 16:54:59 -08:00
Greyson Parrelli 1ee422a012 Update link preview splash to say 'Got it'. 2019-02-07 16:43:40 -08:00
Greyson Parrelli ca87820dd5 Updated language translations. 2019-02-07 16:20:39 -08:00
Greyson Parrelli 45ddb7e1ad Revert "Fix notification badge display."
This reverts commit a0c1446e9f.
2019-02-07 16:17:17 -08:00
Greyson Parrelli fd46777f04 Bump version to 4.33.4
No changes. Need to create a new version to handle Play Store issues.
2019-02-06 10:27:59 -08:00
Greyson Parrelli 5bb36c15d5 Bump version to 4.33.3 2019-02-06 09:22:19 -08:00
Meteor0id c5571e8a8d Add 'Got it' as string to be used on link preview splash screen.
"Understood" or "Got it" is a way of dismissing a splash screen of notification without any change that is applies agreeing to anything.
It replaces "OK" which was sometimes misinterpreted as "I am OK with what I just read".
2019-02-06 09:22:19 -08:00
Greyson Parrelli b8ab1bc3b2 Updated language translations. 2019-02-06 08:39:00 -08:00
Greyson Parrelli 3683e6a9e2 Revert "Apply contact updates in batches of 50."
This reverts commit 5d9d6ac12b.
2019-02-06 00:54:03 -08:00
Greyson Parrelli c364345e1d Add some additional FCM logging. 2019-02-06 00:53:52 -08:00
Greyson Parrelli 7da73bbc30 Updated link preview splash layout. 2019-02-06 00:34:48 -08:00
Greyson Parrelli 177322eca4 Bump version to 4.33.2 2019-02-04 13:57:49 -08:00
Greyson Parrelli 506491d13d Updated language translations. 2019-02-04 13:56:06 -08:00
Greyson Parrelli e884911b60 Update the link preview domain whitelist. 2019-02-04 09:05:40 -08:00
Greyson Parrelli 7b20fca1ac Clearing the text field resets link preview cancellation. 2019-02-04 08:54:54 -08:00
Greyson Parrelli e2c2e59442 Bump version to 4.33.1 2019-02-02 10:13:37 -08:00
Greyson Parrelli be66db898c Fix possible double-cancel in CallRequestController. 2019-02-02 10:09:38 -08:00
Greyson Parrelli 5d9d6ac12b Apply contact updates in batches of 50.
If batch sizes are too large, we'll get a Binder exception.

Fixes #8580
2019-02-01 12:47:34 -08:00
Greyson Parrelli c6d3bed8da Hide emoji button in media flows when system emoji are enabled.
Fixes #8581
2019-02-01 09:17:07 -08:00
Greyson Parrelli e74c429695 Bump version to 4.33.0 2019-01-30 16:34:10 -08:00
Greyson Parrelli 90a37852cc Hide quoted attachments from All Media and media rails.
Fixes #8009
2019-01-30 16:34:10 -08:00
Greyson Parrelli 1763be2956 Hide call settings for groups. 2019-01-30 16:33:02 -08:00
Greyson Parrelli 9797c54a4d Removed sonar ping from calls.
People rarely understood what it meant, and the information is available
on the screen if-needed ('dialing' vs 'ringing').
2019-01-30 16:10:47 -08:00
Greyson Parrelli c5114e2cb3 Updated to WebRTC M71. 2019-01-30 16:10:47 -08:00
Greyson Parrelli e3b22dabce Harden notification channels.
There's odd corner cases where channels can be duplicated. This commit
adds some hard checks where we trim any dead channels, and unset any
notification channels from recipients whose notification channel isn't
present in the system settings.
2019-01-30 16:10:47 -08:00
Bas van Schaik ba67796992 Fix invalid equals in NotificationChannels.channelExists
`DEFAULT_CHANNEL_ID` is a String, but `channel` is a NotificationChannel. Equals will therefore always return `false`. I think my fix (using `getId()`) is what was intended.
2019-01-30 16:10:47 -08:00
Greyson Parrelli d482c60a98 Switch from GCM to FCM. 2019-01-30 16:10:47 -08:00
Greyson Parrelli ebe8d38a91 Update WorkManager to beta03. 2019-01-30 16:10:47 -08:00
Greyson Parrelli c76081d99c Added support for link previews. 2019-01-30 16:10:43 -08:00
Greyson Parrelli bef9beff16 Updated Gradle to 5.1 2019-01-29 09:22:44 -08:00
Greyson Parrelli 25e82ff5e4 Fixed issue where we'd incorrectly show input shadow.
We might have also scrolled with typing indicators when we shouldn't of.

All came down to #isAtBottom() being calculated incorrectly.
2019-01-27 22:07:55 -08:00
Greyson Parrelli 13ffba1c99 Updated language translations. 2019-01-25 17:55:31 -08:00
Greyson Parrelli a0c1446e9f Fix notification badge display.
This reverts commit 2489ea0d5b.
2019-01-21 16:43:59 -08:00
Greyson Parrelli 657b520908 Bump version to 4.32.8 2019-01-20 14:22:27 -08:00
Greyson Parrelli 51e8e8c2c8 Go back to WorkManager beta01.
Looks like there may be a rescheduling bug in beta02. Working through it
with the WorkManager devs.
2019-01-20 14:12:29 -08:00
Greyson Parrelli 1e534a2a10 Fix group avatars not sending.
Fixes #8547
2019-01-20 12:00:18 -08:00
Greyson Parrelli 9fe30524b2 Bump version to 4.32.7 2019-01-17 15:39:13 -08:00
Greyson Parrelli e6b4249cf3 Deprecate usage of the signaling key. 2019-01-17 15:37:53 -08:00
Greyson Parrelli 57ef0e9024 Bump version to 4.32.6 2019-01-17 12:33:41 -08:00
Greyson Parrelli 9ed290b8f6 Updated language translations. 2019-01-17 12:33:41 -08:00
Greyson Parrelli d2be554e1b Use orientation in media picker to determine width and height. 2019-01-17 12:33:41 -08:00
Greyson Parrelli e7a807ab5b Ensure body text is carried through to the media send screen.
We were only doing it if you entered through the media rail. Now we also
do it if you enter through the gallery.
2019-01-17 11:42:01 -08:00
Greyson Parrelli 9ff8f8587b Bump version to 4.32.5 2019-01-16 14:34:36 -08:00
Greyson Parrelli a6f31c60bd Show a toast when you've gone over the max media selection. 2019-01-16 14:31:59 -08:00
Greyson Parrelli 4643dea2ad Filter out non-media from media send screen. 2019-01-16 13:32:39 -08:00
Greyson Parrelli f70bf9c5bd Default to 'All media' bucket for items from the rail.
This should give people a better multi-send experience when they want to
add more media.
2019-01-16 13:18:16 -08:00
Greyson Parrelli 557e6a800f Bump version to 4.32.4 2019-01-16 00:10:46 -08:00
Greyson Parrelli 17a391d3cf Updated language translations. 2019-01-16 00:06:53 -08:00
Greyson Parrelli fc989f3820 Fix album sizing issues on skinnier devices. 2019-01-15 23:57:43 -08:00
Greyson Parrelli 2be382afab Bump version to 4.32.3 2019-01-15 15:10:18 -08:00
Greyson Parrelli b08f81a8dc Fix bug where back stack can get stuck in the gallery. 2019-01-15 15:08:35 -08:00
Greyson Parrelli 535e00c6d0 Saving an album will now save every item.
Fixes a bug where saving would incorrectly only save the first image.
2019-01-15 14:56:27 -08:00
Greyson Parrelli db1abf3746 Bump version to 4.32.2 2019-01-15 13:52:02 -08:00
Greyson Parrelli 66dde4415d Added an 'All media' folder in the gallery. 2019-01-15 13:38:06 -08:00
Greyson Parrelli ce3deb4057 Update WorkManager to beta02. 2019-01-15 12:54:14 -08:00
Greyson Parrelli 2209ff2272 Use AttachmentUploadJob in PushGroupSendJob. 2019-01-15 12:43:38 -08:00
Greyson Parrelli 1502b0ae3e Add processing rules for partial US and BR phone numbers. 2019-01-15 11:57:42 -08:00
Greyson Parrelli 553669de45 Bump version to 4.32.1 2019-01-14 15:43:21 -08:00
Greyson Parrelli 4952b4470d Fix bug related to gallery selection state.
TreeSets are annoying. contains() is calculated with the comparator,
which can lead to some weird bugs. Made sure the comparator didn't think
two items with the same date were identical.

Also fixed stableId generation to avoid any potential weirdness there.
2019-01-14 15:40:38 -08:00
Greyson Parrelli 5450967d00 Ensure all Workers have a public WorkManager constructor. 2019-01-14 15:15:53 -08:00
Greyson Parrelli 37b9e4f200 Bump version to 4.32.0 2019-01-14 11:25:12 -08:00
Greyson Parrelli 254275a8e0 Updated language translations. 2019-01-14 11:25:12 -08:00
Greyson Parrelli 8434813ad6 Updated libsignal-service-java to 2.12.5 2019-01-14 11:25:12 -08:00
Greyson Parrelli dcae8a8a2f Update WorkManager to beta01. 2019-01-14 11:25:12 -08:00
Greyson Parrelli 6fa7eca60b Implement new media send flow.
Update our media send flow to allow users to send multiple images/videos
at once. This change includes:

- New in-app media picker flow.
- Ability to caption images and videos.
- Image editing tools are made more prominent in the flow.
- Some fixes to the image editing tools.
2019-01-14 11:25:06 -08:00
Greyson Parrelli bae55f4b2f Remove redundant km_KH mapping. 2019-01-13 19:25:40 -08:00
riyapenn-signal 7278f6db76 Update in-app language list for Welsh, Hindi, Quechua, Khmer
Languages added: 

1. Welsh Cymraeg cy
2. Hindi Hindi हिंदी hi 
3. Quechua qu_EC

Languages modified: 

1. Khmer from kh-rKH to kh
2019-01-13 19:25:40 -08:00
Greyson Parrelli b553bb1cb0 Don't allow sending SMS unless we're the default. 2019-01-13 19:25:40 -08:00
Greyson Parrelli 3b67382f67 Remove call log permissions, use SMS Retriever API during registration.
This is to adhere to the Play Store policy updates.

See: https://play.google.com/about/privacy-security-deception/permissions/
2019-01-13 19:25:40 -08:00
Greyson Parrelli 19d5ba5c0e Upload attachments in a separate job. 2019-01-13 19:25:40 -08:00
Greyson Parrelli 96c641c2a0 Add support for Job chains. 2019-01-13 19:25:40 -08:00
Greyson Parrelli 1a50910910 Update WorkManager to alpha12. 2019-01-13 19:25:40 -08:00
Greyson Parrelli 40f9b32a75 Fix tap-to-upgrade on website releases.
Tested on Android 9.0, 7.0, and 5.1.

Fixes #7936
2019-01-13 19:08:33 -08:00
Greyson Parrelli 975d7268a1 Bump version to 4.31.8 2019-01-13 07:26:52 -08:00
Greyson Parrelli 7bda952ee5 Fix crash when DeviceName is shorter than 4 characters. 2019-01-13 07:26:16 -08:00
Greyson Parrelli 1c3052a580 Bump version to 4.31.7 2019-01-12 15:50:59 -08:00
Greyson Parrelli 7c66c4a4f7 Updated logging. 2019-01-12 13:32:24 -08:00
Greyson Parrelli c6f3a66cad Support encrypted linked device names. 2019-01-12 13:32:24 -08:00
Greyson Parrelli 4ab02f5b9c Bump version to 4.31.6 2018-12-11 13:37:57 -08:00
Greyson Parrelli 2ab2b2306d Fixed build issues caused by Google jcenter fiasco.
Google removed a bunch of binaries from jcenter that they shouldn't
have, breaking everyone's builds. So now we have manually add repos for
the missing binaries in the meantime.
2018-12-11 13:34:16 -08:00
Greyson Parrelli 3a7f01e16a Updated language translations. 2018-12-11 13:21:54 -08:00
Greyson Parrelli e5a2cea6b0 Fix voice note seeking issue.
On some devices, pausing+resuming (or seeking) would restart playback
from the beginning, but show a progress bar further up. This seems to
have been caused by same race condition-y thing where we were seeking
multiple times in rapid succession. Now we'll only play once, and things
seem to be fine now.

Also removed usage of some deprecated methods.

Fixes #8432
2018-12-11 13:05:36 -08:00
Greyson Parrelli be215b3b1e Bump version to 4.31.5 2018-12-06 23:53:51 -08:00
Greyson Parrelli 2d5c2d24e5 Updated language translations. 2018-12-06 23:53:13 -08:00
Greyson Parrelli 038238a333 Allow multiple attachments to download at once.
Not only will this be faster, but it serves as a mitigation
for the times when WorkManager gets 'stuck'.

Fixes #8427
2018-12-06 23:29:55 -08:00
Greyson Parrelli bfdad2f47c Updated logging. 2018-12-06 12:43:45 -08:00
Greyson Parrelli 2489ea0d5b Revert "Fix notification badge display."
This reverts commit caf93b9203.
2018-12-06 12:14:45 -08:00
Greyson Parrelli 053f071f41 Bump version to 4.31.4 2018-12-04 18:16:00 -08:00
Greyson Parrelli caf93b9203 Fix notification badge display.
Fixes #7580
2018-12-03 15:32:13 -08:00
Greyson Parrelli f0bfd7224f Handle having a null sender certificate at send time.
Fixes #8425
2018-12-03 13:16:29 -08:00
Greyson Parrelli f13becc50b Bump version to 4.31.3 2018-12-01 10:39:48 -08:00
Greyson Parrelli 4b88f7b845 Unsubscribe from typing observers when forwarding messages. 2018-12-01 10:39:48 -08:00
Greyson Parrelli a81cc685b2 Fix crash where toolbar was updated off of the main thread. 2018-12-01 10:22:05 -08:00
Greyson Parrelli b6098a26b4 Update typing indicator intro strings. 2018-12-01 09:55:21 -08:00
Greyson Parrelli d6abf89a7a Filter out typing indicators from ourself. 2018-12-01 09:51:28 -08:00
Greyson Parrelli dd55fe90bc Fix typing experience upgrade version.
Because of the production hotfix, we need to up this version to be
higher than what is currently in prod.
2018-11-28 09:29:19 -08:00
Greyson Parrelli 5a53268534 Update typing indicator intro screen. 2018-11-27 17:45:58 -08:00
Greyson Parrelli 1f9a65e389 Bump version to 4.31.2 2018-11-27 12:51:20 -08:00
Greyson Parrelli 81055e61a6 Update WorkManager to 1.0.0-alpha11. 2018-11-27 12:35:41 -08:00
Greyson Parrelli 8a1a47e773 Fix MediaPreview NPE. 2018-11-27 09:32:56 -08:00
Greyson Parrelli 193d82789f Bump version to 4.31.1 2018-11-26 11:50:55 -08:00
Greyson Parrelli 7f09d1d0d7 Updated language translations. 2018-11-26 11:50:55 -08:00
Greyson Parrelli 187d7b3e3a Fix the caption database migration. 2018-11-26 11:50:55 -08:00
Greyson Parrelli 5d1fcdaded Fix typing indicator animation.
The Android animators were getting out of sync when frames were dropped
(despite my best efforts), so now we just manually render each animation
frame as a function of time, so it never gets screwed up.

Fixes #8388
2018-11-26 09:33:31 -08:00
Greyson Parrelli 36b24d0a20 Rotate sender cert at send time if it's expired. 2018-11-26 07:52:59 -08:00
Greyson Parrelli f9d7cf0e19 Bump version to 4.31.0 2018-11-21 01:55:30 -08:00
Greyson Parrelli 47a10a0288 Added support for multi-image receive. 2018-11-21 01:55:30 -08:00
Greyson Parrelli e665252b86 Add more logging to GenericForegroundService. 2018-11-21 01:55:30 -08:00
Greyson Parrelli a3411072ba Remove MasterSecret job.
It's no longer necessary.
2018-11-21 01:55:30 -08:00
Greyson Parrelli 776b0e23ae Add support for typing indicators. 2018-11-21 01:55:25 -08:00
Greyson Parrelli 3f25fb7d5f Handle voice note media playback with ExoPlayer.
There are several (popular) phone models out there that have bugs in
their MediaPlayer implementation that cause them to be unable to play
voice notes. By moving to ExoPlayer, an application-level media player,
we should avoid most of these headaches and stardardize playback.

Fixes #7748
2018-11-19 11:36:08 -08:00
Greyson Parrelli 053e6fc223 Bump version to 4.30.7 2018-11-17 10:00:55 -08:00
Greyson Parrelli a2ea115650 Initialize jobs in the try block.
In the case where we add new fields to a Job's InputData, we want to
make sure that initialize() is called in the try block so that if it
fails, it simply fails the job (allowing the user to retry with the new
field) instead of crashing.
2018-11-17 09:56:52 -08:00
Greyson Parrelli 3f7e9cb46f Bump version to 4.30.6 2018-11-15 12:50:03 -08:00
Greyson Parrelli cefe50e8a9 Updated language translations. 2018-11-15 12:49:56 -08:00
Greyson Parrelli ff9d5df0e0 Dark theme support for emoji variation selector. 2018-11-15 11:43:38 -08:00
Greyson Parrelli 3716d69b0b Dismiss emoji variation popup when keyboard is dismissed.
Fixes #8372
2018-11-15 10:17:07 -08:00
Greyson Parrelli d5be43cc85 Bump version to 4.30.5 2018-11-14 17:23:03 -08:00
Greyson Parrelli 481ff5c81e Updated language translations. 2018-11-14 17:21:43 -08:00
Greyson Parrelli 3e26060e99 Updated libsignal-service-java to 2.12.2 2018-11-14 16:25:16 -08:00
Greyson Parrelli d93bfbf693 Prevent SendJobs from sending already-sent messages.
This is to guard against behavior WorkManager has where it may
re-enqueue a job that has already been completed (if, for instance, it
was preempted).

Fixes #8268
2018-11-14 16:20:55 -08:00
Greyson Parrelli a7e15dc21e Removed unused asset. 2018-11-14 09:18:45 -08:00
Greyson Parrelli bb566cb11f Bump version to 4.30.4 2018-11-13 20:04:25 -08:00
Greyson Parrelli 28081abe1c Split the 'people' emoji spritesheet into multiple chunks.
The aim of this is to help performance by breaking up the single massive
spritesheet into smaller ones. This will limit the amount of data that
needs to be kept in memory to render emoji.

(Hopefully) Fixes #8357
2018-11-13 19:29:51 -08:00
Greyson Parrelli e7c00a3066 Fix issue where we may oversend SMS messages.
Because SMS sending is split over two jobs, there's no max retry limit
respected if we find out about the failure in SmsSentJob -- it's
requeued as a new job with a fresh attempt counter.

This commit carries a retry count between the two jobs. It also verifies
that we have service before attempting to send a message at all.

Relates to #8268
2018-11-13 15:07:33 -08:00
Greyson Parrelli 446585ad68 Fix emoji variation selector on older devices.
Weird platform-specific bug was preventing the display of the
PopupWindow.
2018-11-13 11:19:29 -08:00
Greyson Parrelli 4ebca9ddde Register RotateSenderCertificateListener in the manifest. 2018-11-13 10:35:02 -08:00
Greyson Parrelli 4c6655bd9a Bump version to 4.30.3 2018-11-09 12:37:27 -08:00
Greyson Parrelli cbc7288242 Updated language translations. 2018-11-09 12:37:27 -08:00
Greyson Parrelli 78627ecb08 Updated libsignal-service-java to 2.12.1 2018-11-09 12:37:24 -08:00
Greyson Parrelli bf9582c97e Only set UNRESTRICTED mode if recipients have a non-null verifier.
Otherwise we could send UD messages to people with non-UD linked
devices.
2018-11-06 09:58:45 -08:00
Greyson Parrelli 1ab3d57378 Fix some places where we were using the Android Logger.
We pretty much always want to be using our own logger.
2018-11-06 09:22:25 -08:00
Greyson Parrelli b36d196873 Bump version to 4.30.2 2018-10-31 14:22:58 -07:00
Greyson Parrelli e31029da89 Update recipient's sealed sender status in more places. 2018-10-31 11:18:35 -07:00
Yassine El Khadiri 787bcf7752 Fix backup MAC checking.
if(MessageDigest.isEqual(ourMac, theirMac) was always returning false
since ourMac was of length 32 and theirMac was of length 10.
2018-10-31 11:17:29 -07:00
Greyson Parrelli 8c3d50c6dc Ignore messages without content. 2018-10-31 08:26:45 -07:00
Greyson Parrelli 532431b0ad Guard against notifying for errors on non-existent SMS threads.
All of the other send jobs do this already, just didn't do it here.
2018-10-31 08:19:33 -07:00
Greyson Parrelli cfeee25488 Use correct link for Sealed Sender blog post.
Fixes #8324
2018-10-30 14:12:34 -07:00
Moxie Marlinspike 608b7ef89a Bump version to 4.30.1 2018-10-30 09:21:31 -07:00
Moxie Marlinspike 4063ef39a4 Update release config 2018-10-30 09:20:54 -07:00
Greyson Parrelli eeb2e2e3af Bump version to 4.30.0 2018-10-30 09:07:57 -07:00
Greyson Parrelli 2573900c30 Updated language translations. 2018-10-30 09:07:57 -07:00
Greyson Parrelli 2acab563d9 Support for sealed sender - Part 2 2018-10-30 08:48:08 -07:00
Moxie Marlinspike 5f31762220 Support for sealed sender - Part 1 2018-10-30 08:48:08 -07:00
Greyson Parrelli b7b9554364 Prevent multiple instances of the same job running concurrently.
There are rare corner cases where a Job could be preempted by the
JobScheduler and then be rescheduled before the preempted job finished
running. This could create weird race conditions with bad consequences.

To fix this, we create a fun locking system that prevents two jobs with
the same UUID from running at the same time.
2018-10-30 08:48:07 -07:00
Greyson Parrelli f15fb904bf Fix desktop double notification bug.
There were situations where we were posting two notifications for messages
when you had an 'active desktop'. This removes that.
2018-10-30 08:48:07 -07:00
Greyson Parrelli 86e4221182 Use a unique notification icon for backups. 2018-10-27 23:34:18 -07:00
Greyson Parrelli dfe8b25dd7 Use a unique notification icon for the persistent background connection. 2018-10-27 23:32:28 -07:00
Greyson Parrelli 53050b3845 Fix issue with group avatar display.
Some legacy code was making the contact photo visible when it shouldn't
be.
2018-10-27 23:12:25 -07:00
Greyson Parrelli 6ce278114f Ensure profile photo in ConversationList is accurate.
Fixes #8270
2018-10-26 11:05:14 -07:00
Greyson Parrelli 48ff9673b9 Allow the selection of fitzpatrick emoji. 2018-10-26 11:05:10 -07:00
Greyson Parrelli 1999d09901 Updated emoji set.
Includes display support for more genders, and more notably, skin tones.
These are not currently selectable in the UI, but they will be rendered
properly when other clients send them.
2018-10-24 17:11:17 -07:00
Greyson Parrelli f93a79ae37 Bump version to 4.29.7 2018-10-24 17:05:23 -07:00
Greyson Parrelli fac56be499 Fix the build by listing google repo first.
Apparently jcenter() is lame and it broke our build. Listing the google
repo first fixes everything.
2018-10-24 16:57:19 -07:00
4322 changed files with 74651 additions and 30575 deletions
+1 -1
View File
@@ -8,7 +8,6 @@ gen/
*.iml *.iml
out out
tests tests
lint.xml
local.properties local.properties
ant.properties ant.properties
.DS_Store .DS_Store
@@ -24,3 +23,4 @@ test/androidTestEspresso/res/values/arrays.xml
obj/ obj/
jni/libspeex/.deps/ jni/libspeex/.deps/
*.sh *.sh
pkcs11.password
+1 -1
View File
@@ -1,6 +1,6 @@
[main] [main]
host = https://www.transifex.com host = https://www.transifex.com
lang_map = fr_CA:fr-rCA,pt_BR:pt-rBR,pt_PT:pt,zh_CN:zh-rCN,zh_HK:zh-rHK,zh_TW:zh-rTW,da_DK:da-rDK,de_DE:de,tr_TR:tr,sv_SE:sv-rSE,bg_BG:bg,el_GR:el,kn_IN:kn-rIN,cs_CZ:cs,he:iw,id:in,lt_LT:lt,km_KH:km-rKH,th_TH:th,hi_IN:hi-rIN lang_map = da_DK:da-rDK,he:iw,id:in,kn_IN:kn-rIN,pt_BR:pt-rBR,pt_PT:pt,qu_EC:qu-rEC,sv_SE:sv-rSE,zh_CN:zh-rCN,zh_HK:zh-rHK,zh_TW:zh-rTW
[signal-android.master] [signal-android.master]
file_filter = res/values-<lang>/strings.xml file_filter = res/values-<lang>/strings.xml
+112 -31
View File
@@ -3,7 +3,7 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
package="org.thoughtcrime.securesms"> package="org.thoughtcrime.securesms">
<uses-sdk tools:overrideLibrary="com.amulyakhare.textdrawable,com.astuetz.pagerslidingtabstrip,pl.tajchert.waitingdots,com.h6ah4i.android.multiselectlistpreferencecompat,android.support.v13,com.davemorrissey.labs.subscaleview,com.tomergoldst.tooltips,com.klinker.android.send_message,com.takisoft.colorpicker,android.support.v14.preference"/> <uses-sdk tools:overrideLibrary="androidx.camera.core,androidx.camera.camera2"/>
<permission android:name="org.thoughtcrime.securesms.ACCESS_SECRETS" <permission android:name="org.thoughtcrime.securesms.ACCESS_SECRETS"
android:label="Access to TextSecure Secrets" android:label="Access to TextSecure Secrets"
@@ -36,7 +36,6 @@
<uses-permission android:name="android.permission.READ_PHONE_STATE" /> <uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_CALL_LOG" />
<uses-permission android:name="android.permission.CAMERA" /> <uses-permission android:name="android.permission.CAMERA" />
@@ -45,7 +44,6 @@
<uses-permission android:name="android.permission.RECORD_AUDIO" /> <uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" /> <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.PROCESS_OUTGOING_CALLS" />
<uses-permission android:name="android.permission.READ_CALL_STATE"/> <uses-permission android:name="android.permission.READ_CALL_STATE"/>
<!-- For sending/receiving events --> <!-- For sending/receiving events -->
@@ -60,6 +58,7 @@
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" /> <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" /> <uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
<uses-permission android:name="android.permission.GET_ACCOUNTS" /> <uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" /> <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
@@ -88,10 +87,7 @@
<uses-permission android:name="android.permission.DISABLE_KEYGUARD" /> <uses-permission android:name="android.permission.DISABLE_KEYGUARD" />
<uses-permission android:name="android.permission.RAISED_THREAD_PRIORITY" /> <uses-permission android:name="android.permission.RAISED_THREAD_PRIORITY" />
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS"/> <uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS"/>
<uses-permission android:name="android.permission.USE_FULL_SCREEN_INTENT"/>
<permission android:name="org.thoughtcrime.securesms.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="org.thoughtcrime.securesms.permission.C2D_MESSAGE" />
<application android:name=".ApplicationContext" <application android:name=".ApplicationContext"
android:icon="@mipmap/ic_launcher" android:icon="@mipmap/ic_launcher"
@@ -100,7 +96,8 @@
tools:replace="android:allowBackup" tools:replace="android:allowBackup"
android:allowBackup="false" android:allowBackup="false"
android:theme="@style/TextSecure.LightTheme" android:theme="@style/TextSecure.LightTheme"
android:largeHeap="true"> android:largeHeap="true"
android:networkSecurityConfig="@xml/local_audio_server_config">
<meta-data <meta-data
android:name="com.google.android.geo.API_KEY" android:name="com.google.android.geo.API_KEY"
@@ -112,6 +109,10 @@
<meta-data android:name="com.google.android.gms.car.application" <meta-data android:name="com.google.android.gms.car.application"
android:resource="@xml/automotive_app_desc" /> android:resource="@xml/automotive_app_desc" />
<meta-data android:name="firebase_analytics_collection_deactivated" android:value="true" />
<meta-data android:name="google_analytics_adid_collection_enabled" android:value="false" />
<meta-data android:name="firebase_messaging_auto_init_enabled" android:value="false" />
<activity android:name="org.thoughtcrime.securesms.WebRtcCallActivity" <activity android:name="org.thoughtcrime.securesms.WebRtcCallActivity"
android:excludeFromRecents="true" android:excludeFromRecents="true"
android:screenOrientation="portrait" android:screenOrientation="portrait"
@@ -176,6 +177,22 @@
</activity> </activity>
<activity android:name=".stickers.StickerPackPreviewActivity"
android:theme="@style/TextSecure.LightNoActionBar"
android:launchMode="singleTask"
android:noHistory="true"
android:windowSoftInputMode="stateHidden"
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="sgnl"
android:host="addstickers" />
</intent-filter>
</activity>
<activity android:name=".ConversationListActivity" <activity android:name=".ConversationListActivity"
android:label="@string/app_name" android:label="@string/app_name"
android:launchMode="singleTask" android:launchMode="singleTask"
@@ -210,7 +227,7 @@
android:value="org.thoughtcrime.securesms.ConversationListActivity" /> android:value="org.thoughtcrime.securesms.ConversationListActivity" />
</activity> </activity>
<activity android:name=".ConversationActivity" <activity android:name=".conversation.ConversationActivity"
android:windowSoftInputMode="stateUnchanged" android:windowSoftInputMode="stateUnchanged"
android:launchMode="singleTask" android:launchMode="singleTask"
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize" android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"
@@ -220,7 +237,9 @@
android:value="org.thoughtcrime.securesms.ConversationListActivity" /> android:value="org.thoughtcrime.securesms.ConversationListActivity" />
</activity> </activity>
<activity android:name=".ConversationPopupActivity" <activity android:name=".longmessage.LongMessageActivity" />
<activity android:name=".conversation.ConversationPopupActivity"
android:windowSoftInputMode="stateVisible" android:windowSoftInputMode="stateVisible"
android:launchMode="singleTask" android:launchMode="singleTask"
android:taskAffinity="" android:taskAffinity=""
@@ -280,6 +299,11 @@
android:windowSoftInputMode="stateHidden" android:windowSoftInputMode="stateHidden"
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/> android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
<activity android:name=".mediasend.MediaSendActivity"
android:theme="@style/TextSecure.DarkNoActionBar"
android:windowSoftInputMode="stateHidden"
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
<activity android:name=".PassphraseChangeActivity" <activity android:name=".PassphraseChangeActivity"
android:label="@string/AndroidManifest__change_passphrase" android:label="@string/AndroidManifest__change_passphrase"
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/> android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
@@ -295,12 +319,30 @@
</intent-filter> </intent-filter>
</activity> </activity>
<activity android:name=".registration.WelcomeActivity"
android:launchMode="singleTask"
android:theme="@style/TextSecure.LightRegistrationTheme"
android:windowSoftInputMode="stateUnchanged"
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
<activity android:name=".RegistrationActivity" <activity android:name=".RegistrationActivity"
android:launchMode="singleTask"
android:theme="@style/TextSecure.LightRegistrationTheme"
android:windowSoftInputMode="stateUnchanged"
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
<activity android:name=".registration.CaptchaActivity"
android:launchMode="singleTask" android:launchMode="singleTask"
android:theme="@style/TextSecure.LightNoActionBar" android:theme="@style/TextSecure.LightNoActionBar"
android:windowSoftInputMode="stateUnchanged" android:windowSoftInputMode="stateUnchanged"
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/> android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
<activity android:name=".stickers.StickerManagementActivity"
android:launchMode="singleTask"
android:theme="@style/TextSecure.LightTheme"
android:windowSoftInputMode="stateUnchanged"
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
<activity android:name=".DeviceActivity" <activity android:name=".DeviceActivity"
android:label="@string/AndroidManifest__linked_devices" android:label="@string/AndroidManifest__linked_devices"
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/> android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
@@ -377,19 +419,15 @@
android:theme="@style/TextSecure.LightTheme" android:theme="@style/TextSecure.LightTheme"
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/> android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
<activity android:name=".scribbles.ScribbleActivity"
android:theme="@style/TextSecure.ScribbleTheme"
android:windowSoftInputMode="stateHidden"
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
<activity android:name=".scribbles.StickerSelectActivity" <activity android:name=".scribbles.StickerSelectActivity"
android:theme="@style/TextSecure.ScribbleTheme" android:theme="@style/TextSecure.DarkTheme"
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/> android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
<activity android:name="com.soundcloud.android.crop.CropImageActivity" /> <activity android:name="com.theartofdev.edmodo.cropper.CropImageActivity"
android:theme="@style/TextSecure.DarkTheme"/>
<activity android:name=".CreateProfileActivity" <activity android:name=".CreateProfileActivity"
android:theme="@style/TextSecure.LightTheme" android:theme="@style/TextSecure.LightRegistrationTheme"
android:windowSoftInputMode="stateVisible" android:windowSoftInputMode="stateVisible"
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/> android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
@@ -422,10 +460,10 @@
android:exported="true" android:exported="true"
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/> android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
<activity android:name=".camera.CameraActivity" <activity
android:theme="@style/TextSecure.ScribbleTheme" android:name=".maps.PlacePickerActivity"
android:windowSoftInputMode="stateHidden" android:label="@string/PlacePickerActivity_title"
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/> android:theme="@style/TextSecure.LightNoActionBar" />
<service android:enabled="true" android:name="org.thoughtcrime.securesms.service.WebRtcCallService"/> <service android:enabled="true" android:name="org.thoughtcrime.securesms.service.WebRtcCallService"/>
<service android:enabled="true" android:name=".service.ApplicationMigrationService"/> <service android:enabled="true" android:name=".service.ApplicationMigrationService"/>
@@ -469,12 +507,11 @@
<service android:name=".service.GenericForegroundService"/> <service android:name=".service.GenericForegroundService"/>
<receiver android:name=".gcm.GcmBroadcastReceiver" android:permission="com.google.android.c2dm.permission.SEND" > <service android:name=".gcm.FcmService">
<intent-filter> <intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" /> <action android:name="com.google.firebase.MESSAGING_EVENT" />
<category android:name="org.thoughtcrime.securesms" />
</intent-filter> </intent-filter>
</receiver> </service>
<receiver android:name=".service.SmsListener" <receiver android:name=".service.SmsListener"
android:permission="android.permission.BROADCAST_SMS" android:permission="android.permission.BROADCAST_SMS"
@@ -551,7 +588,7 @@
android:exported="false" android:exported="false"
android:authorities="org.thoughtcrime.provider.securesms.mms" /> android:authorities="org.thoughtcrime.provider.securesms.mms" />
<provider android:name="android.support.v4.content.FileProvider" <provider android:name="androidx.core.content.FileProvider"
android:authorities="org.thoughtcrime.securesms.fileprovider" android:authorities="org.thoughtcrime.securesms.fileprovider"
android:exported="false" android:exported="false"
android:grantUriPermissions="true"> android:grantUriPermissions="true">
@@ -572,11 +609,18 @@
android:authorities="org.thoughtcrime.securesms.database.attachment" android:authorities="org.thoughtcrime.securesms.database.attachment"
android:exported="false" /> android:exported="false" />
<provider <provider android:name=".database.DatabaseContentProviders$Sticker"
android:name="androidx.work.impl.WorkManagerInitializer" android:authorities="org.thoughtcrime.securesms.database.sticker"
android:authorities="${applicationId}.workmanager-init" android:exported="false" />
<provider android:name=".database.DatabaseContentProviders$StickerPack"
android:authorities="org.thoughtcrime.securesms.database.stickerpack"
android:exported="false" />
<provider android:name="androidx.camera.camera2.impl.Camera2Initializer"
android:authorities="${applicationId}.camerax-init"
android:exported="false" android:exported="false"
tools:node="remove" /> android:enabled="false" />
<receiver android:name=".service.BootReceiver"> <receiver android:name=".service.BootReceiver">
<intent-filter> <intent-filter>
@@ -597,6 +641,12 @@
</intent-filter> </intent-filter>
</receiver> </receiver>
<receiver android:name=".service.RotateSenderCertificateListener">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
<receiver android:name=".service.LocalBackupListener"> <receiver android:name=".service.LocalBackupListener">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" /> <action android:name="android.intent.action.BOOT_COMPLETED" />
@@ -646,6 +696,37 @@
</intent-filter> </intent-filter>
</receiver> </receiver>
<service
android:name=".gcm.FcmJobService"
android:permission="android.permission.BIND_JOB_SERVICE"
android:enabled="@bool/enable_job_service"
tools:targetApi="26" />
<service
android:name=".jobmanager.JobSchedulerScheduler$SystemService"
android:permission="android.permission.BIND_JOB_SERVICE"
android:enabled="@bool/enable_job_service"
tools:targetApi="26" />
<service
android:name=".jobmanager.KeepAliveService"
android:enabled="@bool/enable_alarm_manager" />
<receiver
android:name=".jobmanager.AlarmManagerScheduler$RetryReceiver"
android:enabled="@bool/enable_alarm_manager" />
<!-- Probably don't need this one -->
<receiver
android:name=".jobmanager.BootReceiver"
android:enabled="true">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
<uses-library android:name="org.apache.http.legacy" android:required="false"/>
<uses-library android:name="com.sec.android.app.multiwindow" android:required="false"/> <uses-library android:name="com.sec.android.app.multiwindow" android:required="false"/>
<meta-data android:name="com.sec.android.support.multiwindow" android:value="true" /> <meta-data android:name="com.sec.android.support.multiwindow" android:value="true" />
<meta-data android:name="com.sec.android.multiwindow.DEFAULT_SIZE_W" android:value="632.0dip" /> <meta-data android:name="com.sec.android.multiwindow.DEFAULT_SIZE_W" android:value="632.0dip" />
+2 -2
View File
@@ -4,7 +4,7 @@ RUN dpkg --add-architecture i386 && \
apt-get update -y && \ apt-get update -y && \
apt-get install -y software-properties-common && \ apt-get install -y software-properties-common && \
apt-get update -y && \ apt-get update -y && \
apt-get install -y libc6:i386=2.26-0ubuntu2.1 libncurses5:i386=6.0+20160625-1ubuntu1 libstdc++6:i386=7.2.0-8ubuntu3.2 lib32z1=1:1.2.11.dfsg-0ubuntu2 wget openjdk-8-jdk=8u171-b11-0ubuntu0.17.10.1 git unzip && \ apt-get install -y libc6:i386=2.26-0ubuntu2.1 libncurses5:i386=6.0+20160625-1ubuntu1 libstdc++6:i386=7.2.0-8ubuntu3.2 lib32z1=1:1.2.11.dfsg-0ubuntu2 wget openjdk-8-jdk=8u171-b11-0ubuntu0.17.10.1 git unzip opensc pcscd && \
rm -rf /var/lib/apt/lists/* && \ rm -rf /var/lib/apt/lists/* && \
apt-get autoremove -y && \ apt-get autoremove -y && \
apt-get clean apt-get clean
@@ -12,7 +12,7 @@ RUN dpkg --add-architecture i386 && \
ENV ANDROID_SDK_FILENAME android-sdk_r24.4.1-linux.tgz ENV ANDROID_SDK_FILENAME android-sdk_r24.4.1-linux.tgz
ENV ANDROID_SDK_URL https://dl.google.com/android/${ANDROID_SDK_FILENAME} ENV ANDROID_SDK_URL https://dl.google.com/android/${ANDROID_SDK_FILENAME}
ENV ANDROID_API_LEVELS android-28 ENV ANDROID_API_LEVELS android-28
ENV ANDROID_BUILD_TOOLS_VERSION 27.0.3 ENV ANDROID_BUILD_TOOLS_VERSION 28.0.3
ENV ANDROID_HOME /usr/local/android-sdk-linux ENV ANDROID_HOME /usr/local/android-sdk-linux
ENV PATH ${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools ENV PATH ${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools
RUN cd /usr/local/ && \ RUN cd /usr/local/ && \
+287
View File
@@ -0,0 +1,287 @@
# Reproducible Builds
## TL;DR
You can just use these [instructions](https://signal.org/blog/reproducible-android/) from the official announcement at Open Whisper Systems's blog:
```
# Clone the Signal Android source repository
$ git clone https://github.com/signalapp/Signal-Android.git && cd Signal-Android
# Check out the release tag for the version you'd like to compare
$ git checkout v[the version number]
# Build using the Docker environment
$ docker run --rm -v $(pwd):/project -w /project whispersystems/signal-android:1.3 ./gradlew clean assembleRelease
# Verify the APKs
$ python3 apkdiff/apkdiff.py build/outputs/apks/project-release-unsigned.apk path/to/SignalFromPlay.apk
```
Note that the instructions above use a pre-built Signal Docker image from [Docker Hub](https://hub.docker.com/u/whispersystems/). If you wish to compile the image yourself, continue reading the longer version below.
***
## Introduction
Since version 3.15.0 Signal for Android has supported reproducible builds. This is achieved by replicating the build environment as a Docker image. You'll need to build the image, run a container instance of it, compile Signal inside the container and finally compare the resulted APK to the APK that is distributed in the Google Play Store.
The command line parts in this guide are written for Linux but with some little modifications you can adapt them to macOS (OS X) and Windows. In the following sections we will use `3.15.2` as an example Signal version. You'll just need to replace all occurrences of `3.15.2` with the version number you are about to verify.
## Setting up directories
First let's create a new directory for this whole reproducible builds project. In your home folder (`~`), create a new directory called `reproducible-signal`.
```
user@host:$ mkdir ~/reproducible-signal
```
Next create another directory inside `reproducible-signal` called `apk-from-google-play-store`.
```
user@host:$ mkdir ~/reproducible-signal/apk-from-google-play-store
```
We will use this directory to share APKs between the host OS and the Docker container.
Finally create one more directory inside `reproducible-signal` called `image-build-context`.
```
user@host:$ mkdir ~/reproducible-signal/image-build-context
```
This directory will be used later to build our Docker image.
## Getting the Google Play Store version of Signal APK
To compare the APKs we of course need a version of Signal from the Google Play Store.
First make sure that the Signal version you want to verify is installed on your Android device. You'll need `adb` for this part.
Plug your device to your computer and run this command to pull the APK from the device:
```
user@host:$ adb pull $(adb shell pm path org.thoughtcrime.securesms | grep /base.apk | awk -F':' '{print $2}') ~/reproducible-signal/apk-from-google-play-store/Signal-$(adb shell dumpsys package org.thoughtcrime.securesms | grep versionName | awk -F'=' '{print $2}').apk
```
This will pull a file into `~/reproducible-signal/apk-from-google-play-store/` with the name `Signal-<version>.apk`
Alternatively, you can do this step-by-step:
```
user@host:$ adb shell pm path org.thoughtcrime.securesms
```
This will output something like:
```
package:/data/app/org.thoughtcrime.securesms-aWRzcGlzcG9wZA==/base.apk
```
The output will tell you where the Signal APK is located in your device. (In this example the path is `/data/app/org.thoughtcrime.securesms-aWRzcGlzcG9wZA==/base.apk`)
Now using this information, pull the APK from your device to the `reproducible-signal/apk-from-google-play-store` directory you created before:
```
user@host:$ adb pull \
/data/app/org.thoughtcrime.securesms-aWRzcGlzcG9wZA==/base.apk \
~/reproducible-signal/apk-from-google-play-store/Signal-3.15.2.apk
```
We will use this APK in the final part when we compare it with the self-built APK from GitHub.
## Identifying the ABI
Since v4.37.0, the APKs have been split by ABI, the CPU architecture of the target device. Google play will serve the correct one to you for your device.
To identify which ABIs the google play APK supports, we can look inside the APK, which is just a zip file:
```
user@host:$ unzip -l ~/reproducible-signal/apk-from-google-play-store/Signal-*.apk | grep lib/
```
Example:
```
1214348 00-00-1980 00:00 lib/armeabi-v7a/libconscrypt_jni.so
151980 00-00-1980 00:00 lib/armeabi-v7a/libcurve25519.so
4164320 00-00-1980 00:00 lib/armeabi-v7a/libjingle_peerconnection_so.so
13948 00-00-1980 00:00 lib/armeabi-v7a/libnative-utils.so
2357812 00-00-1980 00:00 lib/armeabi-v7a/libsqlcipher.so
```
As there is just one sub directory of `lib/` called `armeabi-v7a`, that is your ABI. Make a note of that for later. If you see more than one subdirectory of `lib/`:
```
1214348 00-00-1980 00:00 lib/armeabi-v7a/libconscrypt_jni.so
151980 00-00-1980 00:00 lib/armeabi-v7a/libcurve25519.so
4164320 00-00-1980 00:00 lib/armeabi-v7a/libjingle_peerconnection_so.so
13948 00-00-1980 00:00 lib/armeabi-v7a/libnative-utils.so
2357812 00-00-1980 00:00 lib/armeabi-v7a/libsqlcipher.so
2111376 00-00-1980 00:00 lib/x86/libconscrypt_jni.so
201056 00-00-1980 00:00 lib/x86/libcurve25519.so
7303888 00-00-1980 00:00 lib/x86/libjingle_peerconnection_so.so
5596 00-00-1980 00:00 lib/x86/libnative-utils.so
3977636 00-00-1980 00:00 lib/x86/libsqlcipher.so
```
Then that means you have the `universal` APK.
## Installing Docker
Install Docker by following the instructions for your platform at https://docs.docker.com/engine/installation/
Your platform might also have its own preferred way of installing Docker. E.g. Ubuntu has its own Docker package (`docker.io`) if you do not want to follow Docker's instructions.
In the following sections we will assume that your Docker installation works without issues. So after installing, please make sure that everything is running smoothly before continuing.
## Building a Docker image for Signal
#### Grabbing the `Dockerfile`
First you will need the `Dockerfile` for Signal Android. It comes bundled with Signal's source code. The `Dockerfile` contains instructions on how to automatically build a Docker image for Signal. You just need to run it and it builds itself.
Download the `Dockerfile` to the `image-build-context` directory.
```
user@host:$ wget -O ~/reproducible-signal/image-build-context/Dockerfile_v3.15.2 \
https://raw.githubusercontent.com/signalapp/Signal-Android/v3.15.2/Dockerfile
```
Note that the `Dockerfile` is specific to the Signal version you want to compare to. Again you have to adjust the URL above to match the right version. (Though sometimes the file might not be up to date, see the [Troubleshooting section](#troubleshooting))
#### Building the image
Now we have everything we need to build the Docker image for Signal. Go to the `image-build-context` directory:
```
user@host:$ cd ~/reproducible-signal/image-build-context
```
And list the contents.
```
user@host:$ ls
```
The output should look like this:
```
Dockerfile_v3.15.2
```
Now in this directory build the image using `Dockerfile_v3.15.2`:
```
user@host:$ docker build --file Dockerfile_v3.15.2 --tag signal-android .
```
(Note that there is a dot at the end of that command!)
Wait a few years for the build to finish... :construction_worker:
(Depending on your computer and network connection, this may take several minutes.)
:calendar: :sleeping:
After the build has finished, you may wish to list all your Docker images to see that it's really there:
```
user@host:$ docker images
```
Output should look something like this:
```
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
signal-android latest c6b84450b896 46 seconds ago 2.94 GB
ubuntu 14.04.3 8693db7e8a00 9 weeks ago 187.9 MB
```
## Compiling Signal inside a container
Next we will run a container of the image we just built, grab Signal's source code and compile Signal.
First go to the `reproducible-signal` directory:
```
user@host:$ cd ~/reproducible-signal/
```
To run a new ephemeral container with an interactive terminal session execute the following long command:
```
user@host:$ docker run \
--name signal \
--rm \
--interactive \
--tty \
--volume $(pwd)/apk-from-google-play-store:/signal-build/apk-from-google-play-store \
--workdir /signal-build \
signal-android
```
Now you are inside the container.
Grab Signal's source code from GitHub and go to the repository directory:
```
root@container:# git clone https://github.com/signalapp/Signal-Android.git
root@container:# cd Signal-Android
```
Before you can compile, you **must** ensure that you are at the right commit. In other words you **must** checkout the version you wish to verify (here we are verifying 3.15.2):
```
root@container:# git checkout --quiet v3.15.2
```
Now you may compile the release APK by running:
```
root@container:# ./gradlew clean assemblePlayRelease --exclude-task signProductionPlayRelease
```
This will take a few minutes :sleeping:
#### Checking if the APKs match
After the build has completed successfully we can finally compare if the APKs match. For the comparison we need of course the Google Play Store version of Signal APK which you copied to the `apk-from-google-play-store` directory in the beginning of this guide. Because we used that directory as a `--volume` parameter for our container, we can see all the files in that directory within our container.
So now we can compare the APKs using the `apkdiff.py` tool.
The above build step produced several APKs, one for each supported ABI and one universal one. You will need to determine the correct APK to compare.
Currently, the most common ABI is `armeabi-v7a`. Other options at this time include `x86` and `universal`. In the future it will also include 64-bit options, such as `x86_64` and `arm64-v8a`.
See [Identifying the ABI](#identifying-the-abi) above if you don't know the ABI of your play store APK.
Once you have determined the ABI, add an `abi` environment variable. For example, suppose we determine that `armeabi-v7a` is the ABI google play has served:
```
root@container:# export abi=armeabi-v7a
```
And the diff script to compare:
```
root@container:# python3 apkdiff/apkdiff.py \
build/outputs/apk/play/release/*play-$abi-release-unsigned*.apk \
../apk-from-google-play-store/Signal-3.15.2.apk
```
Output:
```
APKs match!
```
If you get `APKs match!`, you have successfully verified that the Google Play release matches with your own self-built version of Signal. Congratulations! Your APKs are a match made in heaven! :sparkles:
If you get `APKs don't match!`, you did something wrong in the previous steps. See the [Troubleshooting section](#troubleshooting) for more info.
## Comparing next time
If the build environment (i.e. `Dockerfile`) has not changed, you don't need to build the image again to verify a newer APK. You can just [run the container again](#compiling-signal-inside-a-container).
## Troubleshooting
If you cannot get things to work, please do not open an issue or comment on an existing issue at GitHub. Instead, ask for help at https://community.signalusers.org/c/development
Some common issues why things may not work:
- some pinned packages in the `Dockerfile` are not available anymore and building of the Docker image fails
- the Android packages in the Docker image are outdated and compiling Signal fails
- you built the Docker image with a wrong version of the `Dockerfile`
- you didn't checkout the correct Signal version tag with Git before compiling
- the ABI you selected is not the correct ABI, particularly if you see an error along the lines of `Sorted manifests don't match, lib/x86/libcurve25519.so vs lib/armeabi-v7a/libcurve25519.so`.
- this guide is outdated
- you are in a dream
- if you run into this issue: https://issuetracker.google.com/issues/110237303 try to add `resources.arsc` to the list of ignored files and compare again
+14 -13
View File
@@ -1,20 +1,21 @@
#! /usr/bin/env python #! /usr/bin/env python3
import sys import sys
from zipfile import ZipFile from zipfile import ZipFile
class ApkDiff: class ApkDiff:
# resources.arsc is ignored due to https://issuetracker.google.com/issues/110237303
IGNORE_FILES = ["META-INF/CERT.RSA", "META-INF/CERT.SF", "META-INF/MANIFEST.MF"] # May be fixed in Android Gradle Plugin 3.4
IGNORE_FILES = ["META-INF/MANIFEST.MF", "META-INF/SIGNAL_S.RSA", "META-INF/SIGNAL_S.SF", "resources.arsc"]
def compare(self, sourceApk, destinationApk): def compare(self, sourceApk, destinationApk):
sourceZip = ZipFile(sourceApk, 'r') sourceZip = ZipFile(sourceApk, 'r')
destinationZip = ZipFile(destinationApk, 'r') destinationZip = ZipFile(destinationApk, 'r')
if self.compareManifests(sourceZip, destinationZip) and self.compareEntries(sourceZip, destinationZip) == True: if self.compareManifests(sourceZip, destinationZip) and self.compareEntries(sourceZip, destinationZip) == True:
print "APKs match!" print("APKs match!")
else: else:
print "APKs don't match!" print("APKs don't match!")
def compareManifests(self, sourceZip, destinationZip): def compareManifests(self, sourceZip, destinationZip):
sourceEntrySortedList = sorted(sourceZip.namelist()) sourceEntrySortedList = sorted(sourceZip.namelist())
@@ -25,21 +26,21 @@ class ApkDiff:
while ignoreFile in destinationEntrySortedList: destinationEntrySortedList.remove(ignoreFile) while ignoreFile in destinationEntrySortedList: destinationEntrySortedList.remove(ignoreFile)
if len(sourceEntrySortedList) != len(destinationEntrySortedList): if len(sourceEntrySortedList) != len(destinationEntrySortedList):
print "Manifest lengths differ!" print("Manifest lengths differ!")
for (sourceEntryName, destinationEntryName) in zip(sourceEntrySortedList, destinationEntrySortedList): for (sourceEntryName, destinationEntryName) in zip(sourceEntrySortedList, destinationEntrySortedList):
if sourceEntryName != destinationEntryName: if sourceEntryName != destinationEntryName:
print "Sorted manifests don't match, %s vs %s" % (sourceEntryName, destinationEntryName) print("Sorted manifests don't match, %s vs %s" % (sourceEntryName, destinationEntryName))
return False return False
return True return True
def compareEntries(self, sourceZip, destinationZip): def compareEntries(self, sourceZip, destinationZip):
sourceInfoList = filter(lambda sourceInfo: sourceInfo.filename not in self.IGNORE_FILES, sourceZip.infolist()) sourceInfoList = list(filter(lambda sourceInfo: sourceInfo.filename not in self.IGNORE_FILES, sourceZip.infolist()))
destinationInfoList = filter(lambda destinationInfo: destinationInfo.filename not in self.IGNORE_FILES, destinationZip.infolist()) destinationInfoList = list(filter(lambda destinationInfo: destinationInfo.filename not in self.IGNORE_FILES, destinationZip.infolist()))
if len(sourceInfoList) != len(destinationInfoList): if len(sourceInfoList) != len(destinationInfoList):
print "APK info lists of different length!" print("APK info lists of different length!")
return False return False
for sourceEntryInfo in sourceInfoList: for sourceEntryInfo in sourceInfoList:
@@ -49,7 +50,7 @@ class ApkDiff:
destinationEntry = destinationZip.open(destinationEntryInfo, 'r') destinationEntry = destinationZip.open(destinationEntryInfo, 'r')
if self.compareFiles(sourceEntry, destinationEntry) != True: if self.compareFiles(sourceEntry, destinationEntry) != True:
print "APK entry %s does not match %s!" % (sourceEntryInfo.filename, destinationEntryInfo.filename) print("APK entry %s does not match %s!" % (sourceEntryInfo.filename, destinationEntryInfo.filename))
return False return False
destinationInfoList.remove(destinationEntryInfo) destinationInfoList.remove(destinationEntryInfo)
@@ -61,7 +62,7 @@ class ApkDiff:
sourceChunk = sourceFile.read(1024) sourceChunk = sourceFile.read(1024)
destinationChunk = destinationFile.read(1024) destinationChunk = destinationFile.read(1024)
while sourceChunk != "" or destinationChunk != "": while sourceChunk != b"" or destinationChunk != b"":
if sourceChunk != destinationChunk: if sourceChunk != destinationChunk:
return False return False
@@ -72,7 +73,7 @@ class ApkDiff:
if __name__ == '__main__': if __name__ == '__main__':
if len(sys.argv) != 3: if len(sys.argv) != 3:
print "Usage: apkdiff <pathToFirstApk> <pathToSecondApk>" print("Usage: apkdiff <pathToFirstApk> <pathToSecondApk>")
sys.exit(1) sys.exit(1)
ApkDiff().compare(sys.argv[1], sys.argv[2]) ApkDiff().compare(sys.argv[1], sys.argv[2])
Binary file not shown.

Before

Width:  |  Height:  |  Size: 337 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 168 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 812 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 444 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 610 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 283 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 694 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 358 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 873 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 442 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1023 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 956 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 854 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 342 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 584 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 482 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 375 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

Some files were not shown because too many files have changed in this diff Show More