Compare commits

...

127 Commits

Author SHA1 Message Date
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
Greyson Parrelli
638012f3d0 Bump version to 4.29.6 2018-10-24 10:58:42 -07:00
Greyson Parrelli
bf452dfa92 Slightly shorten time before we show a foreground notification for pushes.
There's some ANRs, not many, that are likely caused by us riding the
5-second ANR timeout a little too closely. Giving us a little buffer to
see if that helps.
2018-10-24 10:58:06 -07:00
Greyson Parrelli
2b14c98eb0 Do not call bluetooth state listener after service is destroyed. 2018-10-24 10:43:08 -07:00
Greyson Parrelli
f164ac90db Disallow punctuation in icon initials. 2018-10-24 09:57:48 -07:00
Greyson Parrelli
14abbb1bbb Bump version to 4.29.5 2018-10-22 13:04:19 -07:00
Greyson Parrelli
91db26437d Fix camera scaling issues on some phones.
Some phones, notably the Pixel 3, had some problems with scaling after
taking photos. This fixes it by using the takePicture API instead of
pulling the bitmap from the TextureView.

Fixes #8292
2018-10-22 01:12:05 -07:00
Greyson Parrelli
76054a9e33 Ignore events after BluetoothStateManager is destroyed.
Fixes crash.
2018-10-21 13:03:28 -07:00
Greyson Parrelli
ae9c53bdf8 Ensure jobs have a Context during onAdded().
Fixes a crash.
2018-10-20 22:52:14 -07:00
Greyson Parrelli
0dd7b39bb1 Fix recipient prefrence display problem on Android P.
Android P's new ringtone selector is a whole new activity that can cause
RecipientPreferenceActivity to go through the full onCreate() flow after
the ringtone selection. This could cause a race between setting the
preference and reading the preference from the notification channel.
Just threw them on a serial executor to guarantee ordering.
2018-10-20 22:42:35 -07:00
Greyson Parrelli
4a0ea0c51c Handle contexts more consistently in RecipientPreferences.
Fixes a crash that was happening on the Pixel 3.
2018-10-20 22:22:07 -07:00
Greyson Parrelli
668e8dee5d Catch more camera exceptions.
Some devices will simply fail to open the camera with a runtime
exception. In this case, all we can do is catch it and report the error.
2018-10-19 15:57:34 -07:00
Greyson Parrelli
8ec3cf6a43 Bump version to 4.29.4 2018-10-18 09:52:47 -07:00
Greyson Parrelli
a287408a7a Only start the screen lock timeout when the app is backgrounded. 2018-10-18 09:40:32 -07:00
Greyson Parrelli
78124ef224 Bump version to 4.29.3 2018-10-17 14:01:44 -07:00
Greyson Parrelli
45e0bb281f Turn MessageRetrievalService into IncomingMessageObserver.
Due to an Android P bug, we basically need to stop calling
startService() in onResume()/onPause(). That means I had to turn
MessageRetrieval service into a singlton instead of a service. I also
moved the offending KeyCachingService calls into static methods that
didn't have to start the service.
2018-10-17 13:58:47 -07:00
Greyson Parrelli
7a6d863ff7 Bump version to 4.29.2 2018-10-16 22:55:35 -07:00
Greyson Parrelli
feb9e1d513 Post startService() in onPause() as a possible fix to an Android P bug.
We already did it for onResume(), and while it fixed the crash there,
the crash just moved to onPause(). Let's see if the same magic works.
2018-10-16 22:54:29 -07:00
Greyson Parrelli
1a5c1a4b42 Bump version to 4.29.1 2018-10-16 11:53:48 -07:00
Greyson Parrelli
e41ed92f49 Updated language translations. 2018-10-16 11:53:08 -07:00
Greyson Parrelli
7e485b8095 Post startService() in onResume() as a possible fix to an Android P bug.
Got confirmation that the crash we're seeing is a bug, and this might be
a possible workaround.
2018-10-16 11:47:58 -07:00
Greyson Parrelli
92773b1a12 Update delivery icon tint in conversation list. 2018-10-16 11:18:49 -07:00
Greyson Parrelli
7cadb0d35a Properly set the document download icon tint. 2018-10-16 10:58:19 -07:00
Greyson Parrelli
e1f572e1f4 Update GCM foreground notification icon.
Using the default Signal icon can confuse people into thinking they're
message notifications.
2018-10-15 16:56:24 -07:00
Greyson Parrelli
ead323c1af Don't unnecessarily stack GCM message processing.
If we already have two active processing GCM messages, there's no
benefit to a third. In fact, enqueuing additional ones will likely only
end up showing the foreground notification unnecessariliy.
2018-10-15 10:37:30 -07:00
Greyson Parrelli
20c059280c Refactor OrderEnforcer. 2018-10-12 09:30:01 -07:00
414 changed files with 18179 additions and 5200 deletions

1
.gitignore vendored
View File

@@ -24,3 +24,4 @@ test/androidTestEspresso/res/values/arrays.xml
obj/
jni/libspeex/.deps/
*.sh
pkcs11.password

View File

@@ -1,6 +1,6 @@
[main]
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,hi_IN:hi-rIN,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]
file_filter = res/values-<lang>/strings.xml

View File

@@ -36,7 +36,6 @@
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<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" />
@@ -45,7 +44,6 @@
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<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"/>
<!-- For sending/receiving events -->
@@ -280,6 +278,11 @@
android:windowSoftInputMode="stateHidden"
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
<activity android:name=".mediasend.MediaSendActivity"
android:theme="@style/TextSecure.LightNoActionBar"
android:windowSoftInputMode="stateHidden"
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
<activity android:name=".PassphraseChangeActivity"
android:label="@string/AndroidManifest__change_passphrase"
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
@@ -430,7 +433,7 @@
<service android:enabled="true" android:name="org.thoughtcrime.securesms.service.WebRtcCallService"/>
<service android:enabled="true" android:name=".service.ApplicationMigrationService"/>
<service android:enabled="true" android:exported="false" android:name=".service.KeyCachingService"/>
<service android:enabled="true" android:name=".service.MessageRetrievalService"/>
<service android:enabled="true" android:name=".service.IncomingMessageObserver$ForegroundService"/>
<service android:name=".service.QuickResponseService"
android:permission="android.permission.SEND_RESPOND_VIA_MESSAGE"
@@ -597,6 +600,12 @@
</intent-filter>
</receiver>
<receiver android:name=".service.RotateSenderCertificateListener">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
<receiver android:name=".service.LocalBackupListener">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />

View File

@@ -4,7 +4,7 @@ RUN dpkg --add-architecture i386 && \
apt-get update -y && \
apt-get install -y software-properties-common && \
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/* && \
apt-get autoremove -y && \
apt-get clean

Binary file not shown.

Before

Width:  |  Height:  |  Size: 337 KiB

After

Width:  |  Height:  |  Size: 333 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 812 KiB

After

Width:  |  Height:  |  Size: 812 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 610 KiB

After

Width:  |  Height:  |  Size: 604 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 694 KiB

After

Width:  |  Height:  |  Size: 691 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 873 KiB

After

Width:  |  Height:  |  Size: 866 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 MiB

BIN
assets/emoji/People_0.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

BIN
assets/emoji/People_1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

BIN
assets/emoji/People_2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

BIN
assets/emoji/People_3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 692 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 482 KiB

After

Width:  |  Height:  |  Size: 487 KiB

View File

@@ -1,15 +1,17 @@
import org.signal.signing.ApkSignerUtil
import java.security.MessageDigest
buildscript {
repositories {
maven {
url "https://repo1.maven.org/maven2"
jcenter()
}
maven {
url 'https://maven.google.com/'
name 'Google'
}
maven {
url "https://repo1.maven.org/maven2"
jcenter()
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
@@ -48,12 +50,12 @@ repositories {
maven { // textdrawable
url 'https://dl.bintray.com/amulyakhare/maven'
}
maven {
url 'https://dl.bintray.com/google/flexbox-layout/'
}
google()
jcenter()
mavenLocal()
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
dependencies {
@@ -71,16 +73,17 @@ dependencies {
compile 'com.android.support:multidex:1.0.3'
compile 'android.arch.lifecycle:extensions:1.1.1'
compile 'android.arch.lifecycle:common-java8:1.1.1'
compile 'android.arch.work:work-runtime:1.0.0-alpha09'
compile 'android.arch.work:work-runtime:1.0.0-beta02'
compile 'com.google.android.gms:play-services-gcm:9.6.1'
compile 'com.google.android.gms:play-services-maps:9.6.1'
compile 'com.google.android.gms:play-services-places:9.6.1'
compile 'com.google.android.gms:play-services-gcm:16.0.0'
compile 'com.google.android.gms:play-services-maps:16.0.0'
compile 'com.google.android.gms:play-services-places:16.0.0'
compile 'com.google.android.gms:play-services-auth:16.0.1'
compile 'com.google.android.exoplayer:exoplayer-core:2.8.4'
compile 'com.google.android.exoplayer:exoplayer-ui:2.8.4'
compile 'com.google.android.exoplayer:exoplayer-core:2.9.1'
compile 'com.google.android.exoplayer:exoplayer-ui:2.9.1'
compile 'org.whispersystems:signal-service-android:2.9.0'
compile 'org.whispersystems:signal-service-android:2.12.5'
compile 'org.whispersystems:webrtc-android:M69'
compile "me.leolin:ShortcutBadger:1.1.16"
@@ -166,15 +169,17 @@ dependencyVerification {
'com.android.support:cardview-v7:bc9e6b0e06ce1205f1db34f0e6193019613d19cfeb54cdccea722340d1c60f26',
'com.android.support:gridlayout-v7:5029529f7db66f8773426bf7318645f0840fc50d74f66355cd60c5e58d2da087',
'com.android.support:exifinterface:bbf44e519edd6333a24a3285aa21fd00181b920b81ca8aa89a8899f03ab4d6b0',
'android.arch.work:work-runtime:eda29b2cad202dee05a2e5aafe0a37c93ba9cde8f7cc0d0c8926a9f1a9498a8f',
'com.android.support:multidex:ecf6098572e23b5155bab3b9a82b2fd1530eda6c6c157745e0f5287c66eec60c',
'android.arch.work:work-runtime:a865eaf55179bb800f04b04f2fa35c3c4d1108c550bc6b447bca168dac16b56e',
'android.arch.lifecycle:extensions:429426b2feec2245ffc5e75b3b5309bedb36159cf06dc71843ae43526ac289b6',
'android.arch.lifecycle:common-java8:7078b5c8ccb94203df9cc2a463c69cf0021596e6cf966d78fbfd697aaafe0630',
'com.google.android.gms:play-services-gcm:312e61253a236f2d9b750b9c04fc92fd190d23b0b2755c99de6ce4a28b259dae',
'com.google.android.gms:play-services-places:abf3a4a3b146ec7e6e753be62775e512868cf37d6f88ffe2d81167b33b57132b',
'com.google.android.gms:play-services-maps:45e8021e7ddac4a44a82a0e9698991389ded3023d35c58f38dbd86d54211ec0e',
'com.google.android.exoplayer:exoplayer-ui:027557b2d69b15e1852a2530b36971f0dcc177abae240ee35e05f63502cdb0a7',
'com.google.android.exoplayer:exoplayer-core:e69b409e11887c955deb373357c30eeabf183395db0092b4817e0f80bb467d5b',
'org.whispersystems:signal-service-android:bf469abcdcd2b2ba429024aca30713eaa3b83a77af34030a818b1c9fb4780044',
'com.google.android.gms:play-services-gcm:921b4651a2f4d108753f8b4c5d3844b5f8c1f3c31b740c80f69765082713d004',
'com.google.android.gms:play-services-places:2d5c4e4ac3ee5be21b4ec544411bc51d11457b5ae2fa2a5d4539019f87c233c6',
'com.google.android.gms:play-services-maps:07f59c5955b759ce7b80ceaeb8261643c5b79acc9f180df2b7c3987658eed2e8',
'com.google.android.gms:play-services-auth:aec9e1c584d442cb9f59481a50b2c66dc191872607c04d97ecb82dd0eb5149ec',
'com.google.android.exoplayer:exoplayer-ui:7a942afcc402ff01e9bf48e8d3942850986710f06562d50a1408aaf04a683151',
'com.google.android.exoplayer:exoplayer-core:b6ab34abac36bc2bc6934b7a50008162feca2c0fde91aaf1e8c1c22f2c16e2c0',
'org.whispersystems:signal-service-android:d48244f9e19a4300b0baf65c2cef8c76082d55f11d331b00d098c686729cde2e',
'org.whispersystems:webrtc-android:5493c92141ce884fc5ce8240d783232f4fe14bd17a8d0d7d1bd4944d0bd1682f',
'me.leolin:ShortcutBadger:e3cb3e7625892129b0c92dd5e4bc649faffdd526d5af26d9c45ee31ff8851774',
'se.emilsjolander:stickylistheaders:a08ca948aa6b220f09d82f16bbbac395f6b78897e9eeac6a9f0b0ba755928eeb',
@@ -198,10 +203,14 @@ dependencyVerification {
'com.github.dmytrodanylyk.circular-progress-button:library:8dc6a29a5a8db7b2ad5a9a7fda1dc9ae0893f4c8f0545732b2c63854ea693e8e',
'org.signal:android-database-sqlcipher:33d4063336893af00b9d68b418e7b290cace74c20ce8aacffddc0911010d3d73',
'com.googlecode.ez-vcard:ez-vcard:7e24ad50b222d2f70ac91bdccfa3c0f6200b078d797cb784837f75e77bb4210f',
'com.google.android.gms:play-services-iid:54e919f9957b8b7820da7ee9b83471d00d0cac1cf08ddea8b5b41aea80bb1a70',
'com.google.android.gms:play-services-base:0ca636a8fc9a5af45e607cdcd61783bf5d561cbbb0f862021ce69606eee5ad49',
'com.google.android.gms:play-services-tasks:69ec265168e601d0203d04cd42e34bb019b2f029aa1e16fabd38a5153eea2086',
'com.google.android.gms:play-services-basement:95dd882c5ffba15b9a99de3fefb05d3a01946623af67454ca00055d222f85a8d',
'com.google.android.gms:play-services-iid:62aa9d8fbfb66ab68d5afdfe78db3d5da1f6adcc19abac142cee25fb23d3391f',
'com.google.android.gms:play-services-auth-api-phone:19365818b9ceb048ef48db12b5ffadd5eb86dbeb2c7c7b823bfdd89c665f42e5',
'com.google.android.gms:play-services-auth-base:51dc02ad2f8d1d9dff7b5b52c4df2c6c12ef7df55d752e919d5cb4dd6002ecd0',
'com.google.android.gms:play-services-base:aca10c780c3219bc50f3db06734f4ab88badd3113c564c0a3156ff8ff674655b',
'com.google.android.gms:play-services-stats:5b2d8281adbfd6e74d2295c94bab9ea80fc9a84dfbb397995673f5af4d4c6368',
'com.google.android.gms:play-services-places-placereport:04f8baeb1f8f8a734c7d4b1701a3974281b45591affa7e963b59dd019b8abc6e',
'com.google.android.gms:play-services-tasks:b31c18d8d1cc8d9814f295ee7435471333f370ba5bd904ca14f8f2bec4f35c35',
'com.google.android.gms:play-services-basement:e08bfd1e87c4e50ef76161d7ac76b873aeb975367eeb3afa4abe62ea1887c7c6',
'com.android.support:support-v4:8b9031381c678d628c9e47b566ae1d161e1c9710f7855c759beeac7596cecf30',
'com.android.support:support-fragment:3772fc738ada86824ba1a4b3f197c3dbd67b7ddcfe2c9db1de95ef2e3487a915',
'com.android.support:animated-vector-drawable:271ecbc906cda8dcd9e655ba0473129c3408a4189c806f616c378e6fd18fb3b7',
@@ -214,7 +223,7 @@ dependencyVerification {
'com.android.support:customview:98db03845f994e08248bf701c1ff0ccaa12e70f94251ec9272900f0f694e072b',
'com.android.support:swiperefreshlayout:a3b41f7f6730866b49865e86e49f988d4858699765f534300fb2ff5f9325e712',
'com.android.support:asynclayoutinflater:115bde87721f7334579b0c735f60dd7c98af1bb7f34010c5b0553b95dc351aa2',
'android.arch.persistence.room:runtime:c21810eaafce370f1c9df1365393f55f962370a0d8b0b38b4771052c7021b737',
'android.arch.persistence.room:runtime:d05c78d494dc700fd6dbc0e873451aebb2510ffbb070c82179055cb10bdd8822',
'com.android.support:support-core-utils:c81e1e98ca3cb2edae002c69cf35b22aec364b8cb2f1042c97e206eb5790ac41',
'com.android.support:loader:920b85efd72dc33e915b0f88a883fe73b88483c6df8751a741e17611f2460341',
'com.android.support:support-vector-drawable:f658986d968172bccfed28578471c96050780fe5e133861e4d331069cc373f4d',
@@ -229,9 +238,9 @@ dependencyVerification {
'com.github.bumptech.glide:gifdecoder:59ccf3bb0cec11dab4b857382cbe0b171111b6fc62bf141adce4e1180889af15',
'com.android.support:interpolator:7bc7ee86a0db39a4b51956f3e89842d2bd962118d57d779eb6ed6b34ba0677ea',
'com.android.support:cursoradapter:87feffe742b8d62ca8a9833abe564838bf6a672e31c7ad1306ec4006adf90d21',
'android.arch.persistence.room:common:7cf36bcd5f59ddc4876f887e36511bfd7b111f1eb717c0e9b6e2bcc710305ae6',
'android.arch.persistence:db-framework:bd665448330acb90a6f551a87b0ba69169da2b8ec168b92f387997339cc14311',
'android.arch.persistence:db:504e8c4307bfd53084924776ba3d49fed11b6f76d82dd80d5121c2d907fdfef6',
'android.arch.persistence.room:common:fa506873be8a7de9685389b6539ad5849b39731328454b6db151bcab8a9577c3',
'android.arch.persistence:db-framework:f9d1629574008e815a494390857f2125cb3e2cfc291aef8b63625bb3fdc5f360',
'android.arch.persistence:db:4ed3c473a2da0944203a66a9e84f4c2fb3bca9854c5d4a263a56b1aec4a52e74',
'android.arch.core:runtime:c3215aa5873311b3f88a6f4e4a3c25ad89971bc127de8c3e1291c57f93a05c39',
'android.arch.core:common:3a616a32f433e9e23f556b38575c31b013613d3ae85206263b7625fe1f4c151a',
'android.arch.lifecycle:viewmodel:7de29cfaba77d6b5d5be234c57f6812d0150d087e63941af22ba1d1f8e2bc96a',
@@ -239,9 +248,9 @@ dependencyVerification {
'com.android.support:localbroadcastmanager:d287c823af5fdde72c099fcfc5f630efe9687af7a914343ae6fd92de32c8a806',
'com.android.support:print:4be8a812d73e4a80e35b91ceae127def3f0bb9726bf3bc439aa0cc81503f5728',
'com.android.support:support-annotations:5d5b9414f02d3fa0ee7526b8d5ddae0da67c8ecc8c4d63ffa6cf91488a93b927',
'androidx.concurrent:futures:1f63078c41efd29d20ee3444fba93c6cdfaeeb862c6d3b6166ff8debd37d471a',
'org.whispersystems:signal-protocol-android:5b8acded7f2a40178eb90ab8e8cbfec89d170d91b3ff5e78487d1098df6185a1',
'org.whispersystems:signal-service-java:4db9adf763071756cfd93fe48a40850f684ca02f2dea59601841abba7715c5c1',
'com.google.guava:listenablefuture:e4ad7607e5c0477c6f890ef26a49cb8d1bb4dffb650bab4502afee64644e3069',
'org.signal:signal-metadata-android:d9d798aab7ee7200373ecff8718baf8aaeb632c123604e8a41b7b4c0c97eeee1',
'org.whispersystems:signal-service-java:746b0334a2c11e978b50f6474bd67ba1aa7bc76fa96b0f3658411436238d1c79',
'com.github.bumptech.glide:disklrucache:c1b1b6f5bbd01e2fcdc9d7f60913c8d338bdb65ed4a93bfa02b56f19daaade4b',
'com.github.bumptech.glide:annotations:bede99ef9f71517a4274bac18fd3e483e9f2b6108d7d6fe8f4949be4aa4d9512',
'com.nineoldandroids:library:68025a14e3e7673d6ad2f95e4b46d78d7d068343aa99256b686fe59de1b3163a',
@@ -249,22 +258,22 @@ dependencyVerification {
'com.klinkerapps:logger:177e325259a8b111ad6745ec10db5861723c99f402222b80629f576f49408541',
'com.google.android:flexbox:a9989fd13ae2ee42765dfc515fe362edf4f326e74925d02a10369df8092a4935',
'org.jsoup:jsoup:abeaf34795a4de70f72aed6de5966d2955ec7eb348eeb813324f23c999575473',
'com.google.guava:listenablefuture:e4ad7607e5c0477c6f890ef26a49cb8d1bb4dffb650bab4502afee64644e3069',
'androidx.annotation:annotation:04f22f257944ce223701d5aa1bdc36fb7f4594e87b539044045cd161d965468e',
'org.whispersystems:curve25519-android:82595394422b957d4a5b5f1b27b75ba25cf6dc4db4d312418ca38cd6fff279ca',
'org.whispersystems:signal-protocol-java:5152c2b01a25147967d6bf82e540f947901bdfa79260be3eb3e96b03f787d6b5',
'org.whispersystems:signal-protocol-android:b41b7c3a47b0a4ce35802474ae7c5ddc8f033d80209e98abf7ec669543b2b3ee',
'org.signal:signal-metadata-java:af1d0dd766b1e301ed1c44e65161084cf03e2587fe97fdd29ecbea58c6aa6930',
'org.whispersystems:signal-protocol-java:b08207f7e1847228f2a1f0d49e113f93c96c6ed8490be14edddd4be55b2a4a4e',
'com.google.protobuf:protobuf-java:e0c1c64575c005601725e7c6a02cebf9e1285e888f756b2a1d73ffa8d725cc74',
'com.googlecode.libphonenumber:libphonenumber:183392c0565be16d3f6f86680b4106bbde6fe31a402ad21bf9823d938c0c8706',
'com.fasterxml.jackson.core:jackson-databind:835097bcdd11f5bc8a08378c70d4c8054dfa4b911691cc2752063c75534d198d',
'com.fasterxml.jackson.core:jackson-databind:0fb4e079c118e752cc94c15ad22e6782b0dfc5dc09145f4813fb39d82e686047',
'com.squareup.okhttp3:okhttp:7265adbd6f028aade307f58569d814835cd02bc9beffb70c25f72c9de50d61c4',
'com.madgag.spongycastle:pkix:0d9cca6991f68eb373cfad309d5268c9fc38db5efb5fe00dcccf5c973af1eca1',
'com.madgag.spongycastle:prov:b8c3fec3a59aac1aa04ccf4dad7179351e54ef7672f53f508151b614c131398a',
'org.threeten:threetenbp:f4c23ffaaed717c3b99c003e0ee02d6d66377fd47d866fec7d971bd8644fc1a7',
'org.whispersystems:curve25519-java:7dd659d8822c06c3aea1a47f18fac9e5761e29cab8100030b877db445005f03e',
'com.fasterxml.jackson.core:jackson-annotations:0ca408c24202a7626ec8b861e99d85eca5e38b73311dd6dd12e3e9deecc3fe94',
'com.fasterxml.jackson.core:jackson-core:cbf4604784b4de226262845447a1ad3bb38a6728cebe86562e2c5afada8be2c0',
'org.whispersystems:curve25519-android:82595394422b957d4a5b5f1b27b75ba25cf6dc4db4d312418ca38cd6fff279ca',
'com.fasterxml.jackson.core:jackson-annotations:45d32ac61ef8a744b464c54c2b3414be571016dd46bfc2bec226761cf7ae457a',
'com.fasterxml.jackson.core:jackson-core:a2bebaa325ad25455b02149c67e6052367a7d7fc1ce77de000eed284a5214eac',
'com.squareup.okio:okio:734269c3ebc5090e3b23566db558f421f0b4027277c79ad5d176b8ec168bb850',
'com.madgag.spongycastle:core:8d6240b974b0aca4d3da9c7dd44d42339d8a374358aca5fc98e50a995764511f',
'org.whispersystems:curve25519-java:7dd659d8822c06c3aea1a47f18fac9e5761e29cab8100030b877db445005f03e',
]
}
@@ -279,8 +288,8 @@ android {
}
defaultConfig {
versionCode 414
versionName "4.29.0"
versionCode 442
versionName "4.32.2"
minSdkVersion 14
targetSdkVersion 26
@@ -299,6 +308,7 @@ android {
buildConfigField "String", "USER_AGENT", "\"OWA\""
buildConfigField "boolean", "DEV_BUILD", "false"
buildConfigField "String", "MRENCLAVE", "\"cd6cfc342937b23b1bdd3bbf9721aa5615ac9ff50a75c5527d441cd3276826c9\""
buildConfigField "String", "UNIDENTIFIED_SENDER_TRUST_ROOT", "\"BXu6QIKVz5MA8gstzfOgRQGqyLqOwNKHL6INkv3IHWMF\""
ndk {
abiFilters "armeabi", "armeabi-v7a", "x86"
@@ -320,10 +330,6 @@ android {
exclude 'META-INF/proguard/androidx-annotations.pro'
}
signingConfigs {
release
}
buildTypes {
debug {
minifyEnabled true
@@ -353,7 +359,6 @@ android {
release {
minifyEnabled true
proguardFiles = buildTypes.debug.proguardFiles
signingConfig signingConfigs.release
}
}
@@ -405,47 +410,66 @@ android {
}
}
task assembleWebsiteDescriptor << {
android.applicationVariants.all { variant ->
if (variant.name.equals("websiteDebug") ||
variant.name.equals("websiteRelease"))
{
File file = new File(variant.outputs[0].outputFile.path)
if (file.exists()) {
MessageDigest md = MessageDigest.getInstance("SHA-256");
file.eachByte 4096, {bytes, size ->
md.update(bytes, 0, size);
}
String digest = md.digest().collect {String.format "%02x", it}.join();
String url = variant.productFlavors.get(0).ext.websiteUpdateUrl
String apkName = variant.outputs[0].outputFile.name
String descriptor = "{" +
"\"versionCode\" : $project.android.defaultConfig.versionCode," +
"\"versionName\" : \"$project.android.defaultConfig.versionName\"," +
"\"sha256sum\" : \"$digest\"," +
"\"url\" : \"$url/$apkName\"" +
"}"
File descriptorFile = new File(variant.outputs[0].outputFile.parent, apkName.replace(".apk", ".json"))
descriptorFile.write(descriptor)
}
def assembleWebsiteDescriptor = { variant, file ->
if (file.exists()) {
MessageDigest md = MessageDigest.getInstance("SHA-256");
file.eachByte 4096, {bytes, size ->
md.update(bytes, 0, size);
}
String digest = md.digest().collect {String.format "%02x", it}.join();
String url = variant.productFlavors.get(0).ext.websiteUpdateUrl
String apkName = file.getName()
String descriptor = "{" +
"\"versionCode\" : $project.android.defaultConfig.versionCode," +
"\"versionName\" : \"$project.android.defaultConfig.versionName\"," +
"\"sha256sum\" : \"$digest\"," +
"\"url\" : \"$url/$apkName\"" +
"}"
File descriptorFile = new File(file.getParent(), apkName.replace(".apk", ".json"))
descriptorFile.write(descriptor)
}
}
def signProductionRelease = { variant ->
String apkName = variant.outputs[0].outputFile.name
File inputFile = new File(variant.outputs[0].outputFile.path);
File outputFile = new File(variant.outputs[0].outputFile.parent, apkName.replace("-unsigned", ""));
new ApkSignerUtil("sun.security.pkcs11.SunPKCS11",
"pkcs11.config",
"PKCS11",
"file:pkcs11.password").calculateSignature(inputFile.getAbsolutePath(),
outputFile.getAbsolutePath());
inputFile.delete();
return outputFile
}
task signProductionPlayRelease << {
signProductionRelease(android.applicationVariants.find({ it.name.equals("playRelease") }))
}
task signProductionWebsiteRelease << {
def variant = android.applicationVariants.find({ it.name.equals("websiteRelease") })
File signedRelease = signProductionRelease(variant)
assembleWebsiteDescriptor(variant, signedRelease);
}
tasks.whenTaskAdded { task ->
if (task.name.equals("lint")) {
task.enabled = false
}
if (task.name.equals("assembleWebsiteDebug") ||
task.name.equals("assembleWebsiteRelease"))
{
task.finalizedBy assembleWebsiteDescriptor
if (task.name.equals("assemblePlayRelease")) {
task.finalizedBy signProductionPlayRelease
}
if (task.name.equals("assembleWebsiteRelease")) {
task.finalizedBy signProductionWebsiteRelease
}
}
@@ -461,28 +485,3 @@ def getLastCommitTimestamp() {
}
}
def Properties props = new Properties()
def propFile = new File('signing.properties')
if (propFile.canRead()){
props.load(new FileInputStream(propFile))
if (props !=null &&
props.containsKey('STORE_FILE') &&
props.containsKey('STORE_PASSWORD') &&
props.containsKey('KEY_ALIAS') &&
props.containsKey('KEY_PASSWORD'))
{
android.signingConfigs.release.storeFile = file(props['STORE_FILE'])
android.signingConfigs.release.storePassword = props['STORE_PASSWORD']
android.signingConfigs.release.keyAlias = props['KEY_ALIAS']
android.signingConfigs.release.keyPassword = props['KEY_PASSWORD']
} else {
println 'signing.properties found but some entries are missing'
android.buildTypes.release.signingConfig = null
}
}else {
println 'signing.properties not found'
android.buildTypes.release.signingConfig = null
}

9
buildSrc/build.gradle Normal file
View File

@@ -0,0 +1,9 @@
apply plugin: 'java-gradle-plugin'
repositories {
mavenCentral()
}
dependencies {
compile group: 'com.android.tools.build', name: 'apksig', version: '2.3.0'
}

View File

@@ -0,0 +1,141 @@
package org.signal.signing;
import com.android.apksig.ApkSigner;
import com.android.apksig.apk.ApkFormatException;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.security.InvalidKeyException;
import java.security.KeyStore;
import java.security.KeyStoreException;
import java.security.NoSuchAlgorithmException;
import java.security.PrivateKey;
import java.security.Provider;
import java.security.Security;
import java.security.SignatureException;
import java.security.UnrecoverableKeyException;
import java.security.cert.Certificate;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
import java.util.Collections;
import java.util.Enumeration;
import java.util.LinkedList;
import java.util.List;
public class ApkSignerUtil {
private final String providerClass;
private final String providerArgument;
private final String keyStoreType;
private final String keyStorePassword;
public ApkSignerUtil(String providerClass, String providerArgument, String keyStoreType, String keyStorePassword) {
this.providerClass = providerClass;
this.providerArgument = providerArgument;
this.keyStoreType = keyStoreType;
this.keyStorePassword = keyStorePassword;
}
public void calculateSignature(String inputApkFile, String outputApkFile)
throws KeyStoreException, IOException, CertificateException, NoSuchAlgorithmException, UnrecoverableKeyException, ApkFormatException, InvalidKeyException, SignatureException
{
System.out.println("Running calculateSignature()...");
if (providerClass != null) {
installProvider(providerClass, providerArgument);
}
ApkSigner apkSigner = new ApkSigner.Builder(Collections.singletonList(loadKeyStore(keyStoreType, keyStorePassword)))
.setV1SigningEnabled(true)
.setV2SigningEnabled(true)
.setInputApk(new File(inputApkFile))
.setOutputApk(new File(outputApkFile))
.setOtherSignersSignaturesPreserved(false)
.build();
apkSigner.sign();
}
private void installProvider(String providerName, String providerArgument) {
try {
Class<?> providerClass = Class.forName(providerName);
if (!Provider.class.isAssignableFrom(providerClass)) {
throw new IllegalArgumentException("JCA Provider class " + providerClass + " not subclass of " + Provider.class.getName());
}
Provider provider;
if (providerArgument != null) {
provider = (Provider) providerClass.getConstructor(String.class).newInstance(providerArgument);
} else {
provider = (Provider) providerClass.getConstructor().newInstance();
}
Security.addProvider(provider);
} catch (ClassNotFoundException | InstantiationException | InvocationTargetException | IllegalAccessException | NoSuchMethodException e) {
throw new IllegalArgumentException(e);
}
}
private ApkSigner.SignerConfig loadKeyStore(String keyStoreType, String keyStorePassword) throws KeyStoreException, IOException, CertificateException, NoSuchAlgorithmException, UnrecoverableKeyException {
KeyStore keyStoreEntity = KeyStore.getInstance(keyStoreType == null ? KeyStore.getDefaultType() : keyStoreType);
char[] password = getPassword(keyStorePassword);
keyStoreEntity.load(null, password);
Enumeration<String> aliases = keyStoreEntity.aliases();
String keyAlias = null;
while (aliases != null && aliases.hasMoreElements()) {
String alias = aliases.nextElement();
if (keyStoreEntity.isKeyEntry(alias)) {
keyAlias = alias;
break;
}
}
if (keyAlias == null) {
throw new IllegalArgumentException("Keystore has no key entries!");
}
PrivateKey privateKey = (PrivateKey) keyStoreEntity.getKey(keyAlias, password);
Certificate[] certificates = keyStoreEntity.getCertificateChain(keyAlias);
if (certificates == null || certificates.length == 0) {
throw new IllegalArgumentException("Unable to load certificates!");
}
List<X509Certificate> results = new LinkedList<>();
for (Certificate certificate : certificates) {
results.add((X509Certificate)certificate);
}
return new ApkSigner.SignerConfig.Builder("Signal Signer", privateKey, results).build();
}
private char[] getPassword(String encoded) throws IOException {
if (encoded.startsWith("file:")) {
String name = encoded.substring("file:".length());
BufferedReader reader = new BufferedReader(new FileReader(new File(name)));
String password = reader.readLine();
if (password.length() == 0) {
throw new IOException("Failed to read password from file: " + name);
}
return password.toCharArray();
} else {
return encoded.toCharArray();
}
}
}

5
pkcs11.config Normal file
View File

@@ -0,0 +1,5 @@
name = OpenSC-PKCS11
description = SunPKCS11 via OpenSC
library = /usr/lib/x86_64-linux-gnu/opensc-pkcs11.so
slotListIndex = 0

15
protobuf/DeviceName.proto Normal file
View File

@@ -0,0 +1,15 @@
/**
* Copyright (C) 2014-2016 Open Whisper Systems
*
* Licensed according to the LICENSE file in this repository.
*/
package signalservice;
option java_package = "org.thoughtcrime.securesms.devicelist";
option java_outer_classname = "DeviceNameProtos";
message DeviceName {
optional bytes ephemeralPublic = 1;
optional bytes syntheticIv = 2;
optional bytes ciphertext = 3;
}

View File

@@ -1,3 +1,3 @@
all:
protoc --java_out=../src/ WebRtcData.proto Backups.proto
protoc --java_out=../src/ WebRtcData.proto Backups.proto DeviceName.proto

Binary file not shown.

After

Width:  |  Height:  |  Size: 221 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 397 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 661 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 478 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 485 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 227 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 336 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 311 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 324 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 198 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 365 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 725 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 490 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 664 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 231 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 521 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 765 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 956 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 265 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 688 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 988 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="5dp" />
<solid android:color="@color/core_grey_85" />
</shape>

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="5dp" />
<solid android:color="@color/core_white" />
</shape>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
<solid android:color="@color/signal_primary"/>
</shape>

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<stroke
android:width="1px"
android:color="@color/transparent_white_30" />
</shape>

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<stroke
android:width="1px"
android:color="@color/transparent_black_30" />
</shape>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:pathData="M24,0 L0,24 L24,24 Z"
android:strokeColor="#00000000"
android:fillColor="#ffffff"/>
</vector>

View File

@@ -1,14 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.google.android.exoplayer2.ui.SimpleExoPlayerView
android:id="@+id/video_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:gravity="center"/>
<com.google.android.exoplayer2.ui.PlayerView
android:id="@+id/video_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:gravity="center"
app:player_layout_id="@layout/media_preview_exoplayer_layout"/>
</FrameLayout>

View File

@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/album_thumbnail_root"
android:orientation="horizontal"
android:layout_width="300dp"
android:layout_height="150dp">
<org.thoughtcrime.securesms.components.ThumbnailView
android:id="@+id/album_cell_1"
android:layout_height="150dp"
android:layout_width="149dp"
app:thumbnail_radius="0dp"/>
<org.thoughtcrime.securesms.components.ThumbnailView
android:id="@+id/album_cell_2"
android:layout_height="150dp"
android:layout_width="149dp"
android:layout_gravity="right|end"
app:thumbnail_radius="0dp"/>
</FrameLayout>

View File

@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/album_thumbnail_root"
android:layout_width="300dp"
android:layout_height="200dp">
<org.thoughtcrime.securesms.components.ThumbnailView
android:id="@+id/album_cell_1"
android:layout_height="200dp"
android:layout_width="199dp"
app:thumbnail_radius="0dp"/>
<org.thoughtcrime.securesms.components.ThumbnailView
android:id="@+id/album_cell_2"
android:layout_height="99dp"
android:layout_width="99dp"
android:layout_gravity="right|end|top"
app:thumbnail_radius="0dp"/>
<org.thoughtcrime.securesms.components.ThumbnailView
android:id="@+id/album_cell_3"
android:layout_height="99dp"
android:layout_width="99dp"
android:layout_gravity="right|end|bottom"
app:thumbnail_radius="0dp"/>
</FrameLayout>

View File

@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/album_thumbnail_root"
android:layout_width="300dp"
android:layout_height="300dp">
<org.thoughtcrime.securesms.components.ThumbnailView
android:id="@+id/album_cell_1"
android:layout_height="149dp"
android:layout_width="149dp"
app:thumbnail_radius="0dp"/>
<org.thoughtcrime.securesms.components.ThumbnailView
android:id="@+id/album_cell_2"
android:layout_height="149dp"
android:layout_width="149dp"
android:layout_gravity="right|end|top"
app:thumbnail_radius="0dp"/>
<org.thoughtcrime.securesms.components.ThumbnailView
android:id="@+id/album_cell_3"
android:layout_height="149dp"
android:layout_width="149dp"
android:layout_gravity="left|start|bottom"
app:thumbnail_radius="0dp"/>
<org.thoughtcrime.securesms.components.ThumbnailView
android:id="@+id/album_cell_4"
android:layout_height="149dp"
android:layout_width="149dp"
android:layout_gravity="right|end|bottom"
app:thumbnail_radius="0dp"/>
</FrameLayout>

View File

@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/album_thumbnail_root"
android:layout_width="300dp"
android:layout_height="250dp">
<org.thoughtcrime.securesms.components.ThumbnailView
android:id="@+id/album_cell_1"
android:layout_height="149dp"
android:layout_width="149dp"
app:thumbnail_radius="0dp"/>
<org.thoughtcrime.securesms.components.ThumbnailView
android:id="@+id/album_cell_2"
android:layout_height="149dp"
android:layout_width="149dp"
android:layout_gravity="right|end|top"
app:thumbnail_radius="0dp"/>
<org.thoughtcrime.securesms.components.ThumbnailView
android:id="@+id/album_cell_3"
android:layout_height="99dp"
android:layout_width="99dp"
android:layout_gravity="left|start|bottom"
app:thumbnail_radius="0dp"/>
<org.thoughtcrime.securesms.components.ThumbnailView
android:id="@+id/album_cell_4"
android:layout_height="99dp"
android:layout_width="99dp"
android:layout_gravity="center_horizontal|bottom"
app:thumbnail_radius="0dp"/>
<org.thoughtcrime.securesms.components.ThumbnailView
android:id="@+id/album_cell_5"
android:layout_height="99dp"
android:layout_width="99dp"
android:layout_gravity="right|end|bottom"
app:thumbnail_radius="0dp"/>
</FrameLayout>

View File

@@ -0,0 +1,61 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/album_thumbnail_root"
android:layout_width="300dp"
android:layout_height="250dp">
<org.thoughtcrime.securesms.components.ThumbnailView
android:id="@+id/album_cell_1"
android:layout_height="149dp"
android:layout_width="149dp"
app:thumbnail_radius="0dp"/>
<org.thoughtcrime.securesms.components.ThumbnailView
android:id="@+id/album_cell_2"
android:layout_height="149dp"
android:layout_width="149dp"
android:layout_gravity="right|end|top"
app:thumbnail_radius="0dp"/>
<org.thoughtcrime.securesms.components.ThumbnailView
android:id="@+id/album_cell_3"
android:layout_height="99dp"
android:layout_width="99dp"
android:layout_gravity="left|start|bottom"
app:thumbnail_radius="0dp"/>
<org.thoughtcrime.securesms.components.ThumbnailView
android:id="@+id/album_cell_4"
android:layout_height="99dp"
android:layout_width="99dp"
android:layout_gravity="center_horizontal|bottom"
app:thumbnail_radius="0dp"/>
<FrameLayout
android:layout_width="99dp"
android:layout_height="99dp"
android:layout_gravity="right|end|bottom">
<org.thoughtcrime.securesms.components.ThumbnailView
android:id="@+id/album_cell_5"
android:layout_height="match_parent"
android:layout_width="match_parent"
android:layout_gravity="center_horizontal|bottom"
app:thumbnail_radius="0dp"/>
<TextView
android:id="@+id/album_cell_overflow_text"
android:layout_height="match_parent"
android:layout_width="match_parent"
android:gravity="center"
android:textSize="28dp"
android:textColor="@color/core_white"
android:background="@color/transparent_black_40"
tools:text="+2" />
</FrameLayout>
</FrameLayout>

View File

@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<merge
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<FrameLayout
android:id="@+id/album_cell_container"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="?conversation_background"/>
<ViewStub
android:id="@+id/album_transfer_controls_stub"
android:layout_width="70dp"
android:layout_height="70dp"
android:layout_gravity="center"
android:layout="@layout/transfer_controls_stub" />
</merge>

View File

@@ -9,7 +9,7 @@
android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="16dp"
android:paddingBottom="2dp"
android:scrollbars="vertical"
android:cacheColorHint="?conversation_background"
android:clipChildren="false"

View File

@@ -36,8 +36,8 @@
<org.thoughtcrime.securesms.components.AvatarImageView
android:id="@+id/contact_photo"
android:foreground="@drawable/contact_photo_background"
android:layout_width="36dp"
android:layout_height="36dp"
android:layout_width="@dimen/conversation_item_avatar_size"
android:layout_height="@dimen/conversation_item_avatar_size"
android:cropToPadding="true"
android:contentDescription="@string/conversation_item_received__contact_photo_description" />

View File

@@ -9,4 +9,5 @@
android:visibility="gone"
app:doc_titleColor="?conversation_item_received_text_primary_color"
app:doc_captionColor="?conversation_item_received_text_secondary_color"
app:doc_downloadButtonTint="@color/core_white"
tools:visibility="visible"/>

View File

@@ -9,4 +9,5 @@
android:visibility="gone"
app:doc_titleColor="?conversation_item_sent_text_primary_color"
app:doc_captionColor="?conversation_item_sent_text_secondary_color"
app:doc_downloadButtonTint="?conversation_item_sent_download_icon_color"
tools:visibility="visible"/>

View File

@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<merge
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">
<org.thoughtcrime.securesms.components.ThumbnailView
android:id="@+id/conversation_thumbnail_image"
@@ -12,8 +13,19 @@
android:longClickable="false"
android:scaleType="fitCenter"
android:contentDescription="@string/conversation_item__mms_image_description"
android:visibility="gone"
tools:visibility="visible"
app:thumbnail_radius="1dp"/>
<org.thoughtcrime.securesms.components.AlbumThumbnailView
android:id="@+id/conversation_thumbnail_album"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="false"
android:longClickable="false"
android:contentDescription="@string/conversation_item__mms_image_description"
android:visibility="gone"/>
<ImageView
android:id="@+id/conversation_thumbnail_shade"
android:layout_width="match_parent"

View File

@@ -28,7 +28,6 @@
android:layout_height="36dp"
android:layout_marginLeft="8dp"
android:layout_marginStart="8dp"
android:src="@drawable/icon_transparent"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_centerVertical="true"/>

View File

@@ -88,21 +88,36 @@
android:visibility="gone"
tools:visibility="visible"/>
<org.thoughtcrime.securesms.components.emoji.EmojiTextView
android:id="@+id/subject"
android:layout_width="match_parent"
<FrameLayout
android:id="@+id/subject_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingRight="1dp"
android:layout_below="@id/from"
android:layout_toRightOf="@id/indicators_parent"
android:layout_toEndOf="@id/indicators_parent"
android:layout_toLeftOf="@+id/status"
android:layout_toStartOf="@+id/status">
<org.thoughtcrime.securesms.components.emoji.EmojiTextView
android:id="@+id/subject"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/Signal.Text.Preview"
android:textColor="?attr/conversation_list_item_subject_color"
android:maxLines="1"
tools:text="Wheels arrive at 3pm flat. This is a somewhat longer message."
android:ellipsize="end" />
<org.thoughtcrime.securesms.components.TypingIndicatorView
android:id="@+id/typing_indicator"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/from"
android:layout_toRightOf="@id/indicators_parent"
android:layout_toEndOf="@id/indicators_parent"
android:layout_toLeftOf="@+id/status"
android:layout_toStartOf="@+id/status"
android:paddingRight="1dp"
style="@style/Signal.Text.Preview"
android:textColor="?attr/conversation_list_item_subject_color"
android:maxLines="1"
tools:text="Wheels arrive at 3pm flat. This is a somewhat longer message."
android:ellipsize="end" />
android:layout_marginTop="4dp"
android:visibility="gone"
app:typingIndicator_tint="?conversation_list_typing_tint"/>
</FrameLayout>
<org.thoughtcrime.securesms.components.ThumbnailView
android:id="@+id/thumbnail"

View File

@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<org.thoughtcrime.securesms.components.ConversationTypingView
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="8dp"
android:paddingRight="8dp"
android:paddingTop="2dp"
android:gravity="center_vertical">
<org.thoughtcrime.securesms.components.AvatarImageView
android:id="@+id/typing_avatar"
android:foreground="@drawable/contact_photo_background"
android:layout_width="@dimen/conversation_item_avatar_size"
android:layout_height="@dimen/conversation_item_avatar_size"
android:cropToPadding="true"
android:contentDescription="@string/conversation_item_received__contact_photo_description" />
<FrameLayout
android:id="@+id/typing_bubble"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:layout_marginStart="8dp"
android:padding="12dp"
android:background="@drawable/message_bubble_background">
<org.thoughtcrime.securesms.components.TypingIndicatorView
android:id="@+id/typing_indicator"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</FrameLayout>
</org.thoughtcrime.securesms.components.ConversationTypingView>

View File

@@ -77,7 +77,6 @@
android:visibility="gone"
android:background="@drawable/circle_touch_highlight_background"
android:src="@drawable/ic_download_circle_fill_white_48dp"
android:tint="@color/core_grey_60"
android:contentDescription="@string/audio_view__download_accessibility_description"/>
</org.thoughtcrime.securesms.components.AnimatingToggle>

View File

@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="2dp"
android:background="?selectableItemBackground">
<ImageView
android:id="@+id/emoji_image"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:paddingTop="6dp"
android:paddingRight="6dp"
android:paddingLeft="6dp"
android:adjustViewBounds="true"
android:scaleType="fitCenter" />
<org.thoughtcrime.securesms.components.emoji.AsciiEmojiView
android:id="@+id/emoji_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="6dp"
android:paddingRight="6dp"
android:paddingLeft="6dp"
android:visibility="gone"/>
<ImageView
android:id="@+id/emoji_variation_hint"
android:layout_width="7dp"
android:layout_height="7dp"
android:layout_gravity="bottom|right|end"
app:srcCompat="@drawable/triangle_bottom_right_corner"
android:tint="@color/core_grey_25"/>
</FrameLayout>

View File

@@ -36,7 +36,7 @@
</LinearLayout>
<android.support.v4.view.ViewPager
<org.thoughtcrime.securesms.components.ControllableViewPager
android:id="@+id/emoji_pager"
android:visibility="visible"
android:layout_width="match_parent"

View File

@@ -4,15 +4,11 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
<GridView android:id="@+id/emoji"
android:visibility="visible"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:stretchMode="columnWidth"
android:columnWidth="@dimen/emoji_drawer_size"
android:horizontalSpacing="0dp"
android:verticalSpacing="0dp"
android:numColumns="auto_fit"
android:gravity="center"/>
<android.support.v7.widget.RecyclerView
android:id="@+id/emoji"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false"
android:paddingBottom="8dp"/>
</FrameLayout>

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="?attr/emoji_variation_selector_background">
</LinearLayout>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<ImageView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="50dp"
android:layout_height="50dp"
android:padding="6dp">
</ImageView>

View File

@@ -0,0 +1,107 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:background="#FF2090ea">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/blurb"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:fontFamily="sans-serif-light"
android:gravity="center_horizontal"
android:paddingLeft="20dp"
android:paddingRight="20dp"
android:text="@string/ExperienceUpgradeActivity_introducing_typing_indicators"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@android:color/white"
android:textIsSelectable="false"
android:textSize="@dimen/onboarding_title_size" />
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="20dp"
android:layout_marginBottom="20dp">
<ImageView
android:layout_width="170dp"
android:layout_height="170dp"
android:scaleType="fitCenter"
android:src="@drawable/circle_tintable" />
<ImageView
android:layout_width="120dp"
android:layout_height="70dp"
android:layout_gravity="center"
android:src="@drawable/message_bubble_background"
android:tint="@color/signal_primary" />
<org.thoughtcrime.securesms.components.TypingIndicatorView
android:id="@+id/typing_indicator"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:scaleX="2.5"
android:scaleY="2.5" />
</FrameLayout>
<TextView
android:id="@+id/subblurb"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="sans-serif-light"
android:gravity="center_horizontal"
android:paddingLeft="20dp"
android:paddingRight="20dp"
android:text="@string/ExperienceUpgradeActivity_now_you_can_optionally_see_and_share_when_messages_are_being_typed"
android:textColor="@color/core_white"
android:textIsSelectable="false"
android:textSize="@dimen/onboarding_subtitle_size" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:fontFamily="sans-serif-light"
android:gravity="center_horizontal"
android:paddingLeft="20dp"
android:paddingRight="20dp"
android:text="@string/ExperienceUpgradeActivity_would_you_like_to_enable_them_now"
android:textColor="@color/core_white"
android:textIsSelectable="false"
android:textSize="@dimen/onboarding_subtitle_size" />
<android.support.v7.widget.AppCompatButton
android:id="@+id/experience_yes_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="8dp"
android:text="@string/ExperienceUpgradeActivity_turn_on_typing_indicators"
android:textColor="@color/core_blue"
app:backgroundTint="@color/core_white" />
<android.support.v7.widget.AppCompatButton
android:id="@+id/experience_no_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:text="@string/ExperienceUpgradeActivity_no_thanks"
android:textColor="@color/core_white"
app:backgroundTint="@color/conversation_blue" />
</LinearLayout>
</ScrollView>

View File

@@ -1,13 +1,67 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/gray95">
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/gray95">
<org.thoughtcrime.securesms.components.viewpager.HackyViewPager
android:id="@+id/media_pager"
android:id="@+id/media_pager"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clickable="true"/>
<LinearLayout
android:id="@+id/media_preview_details_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:orientation="vertical"
android:background="@drawable/image_shade"
android:gravity="bottom"
android:visibility="gone"
android:animateLayoutChanges="true">
<org.thoughtcrime.securesms.components.MaxHeightScrollView
android:id="@+id/media_preview_caption_container"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
android:layout_height="wrap_content"
android:paddingTop="32dp"
android:animateLayoutChanges="true"
app:scrollView_maxHeight="120dp">
<org.thoughtcrime.securesms.components.emoji.EmojiTextView
android:id="@+id/media_preview_caption"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:paddingBottom="8dp"
style="@style/Signal.Text.Body"
android:textColor="@color/core_white"
android:gravity="bottom"
tools:text="With great power comes great responsibility." />
</org.thoughtcrime.securesms.components.MaxHeightScrollView>
<android.support.v7.widget.RecyclerView
android:id="@+id/media_preview_album_rail"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginLeft="12dp"
android:layout_marginRight="12dp"
tools:layout_height="64dp"/>
<FrameLayout
android:id="@+id/media_preview_playback_controls_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:animateLayoutChanges="true"/>
</LinearLayout>
</FrameLayout>

View File

@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:animateLayoutChanges="true">
<org.thoughtcrime.securesms.components.ThumbnailView
android:id="@+id/rail_item_image"
android:layout_width="56dp"
android:layout_height="56dp"
android:layout_margin="2dp"
android:padding="2dp"
android:background="@drawable/media_rail_item_background"
app:thumbnail_radius="0dp"/>
<ImageView
android:layout_width="52dp"
android:layout_height="52dp"
android:layout_gravity="center"
android:src="@drawable/mediapicker_item_border_dark"/>
<ImageView
android:id="@+id/rail_item_delete"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right|end|top"
android:src="@drawable/ic_x_circle"
android:elevation="8dp"
android:visibility="gone"
tools:visibility="visible"/>
</FrameLayout>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.google.android.exoplayer2.ui.AspectRatioFrameLayout
android:id="@+id/exo_content_frame"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"/>
</FrameLayout>

View File

@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
@@ -8,6 +9,7 @@
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clickable="false"
android:contentDescription="@string/media_preview_activity__media_content_description" />
<ViewStub android:id="@+id/video_player_stub"

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<FrameLayout
android:id="@+id/mediapicker_fragment_container"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>

View File

@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="?android:windowBackground">
<android.support.v7.widget.Toolbar
android:id="@+id/mediapicker_toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:minHeight="?attr/actionBarSize"
android:background="?attr/conversation_list_toolbar_background"
android:theme="?attr/actionBarStyle" />
<android.support.v7.widget.RecyclerView
android:id="@+id/mediapicker_folder_list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="2dp"
android:layout_marginTop="2dp" />
</LinearLayout>

View File

@@ -0,0 +1,62 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginRight="2dp"
android:layout_marginBottom="2dp">
<org.thoughtcrime.securesms.components.SquareImageView
android:id="@+id/mediapicker_folder_item_thumbnail"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:scaleType="centerCrop"/>
<ImageView
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_gravity="bottom"
android:src="@drawable/image_shade"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:orientation="horizontal"
android:gravity="center_vertical"
android:padding="6dp">
<ImageView
android:id="@+id/mediapicker_folder_item_icon"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_marginRight="6dp"
android:layout_marginEnd="6dp"
android:src="@drawable/ic_folder_white_48dp"/>
<TextView
android:id="@+id/mediapicker_folder_item_title"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginRight="6dp"
android:layout_marginEnd="6dp"
android:maxLines="1"
android:ellipsize="end"
style="@style/Signal.Text.Preview"
android:textColor="@color/core_white"
tools:text="Daily Bugle"/>
<TextView
android:id="@+id/mediapicker_folder_item_count"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/Signal.Text.Preview"
android:textColor="@color/core_white"
tools:text="122"/>
</LinearLayout>
</FrameLayout>

View File

@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="?android:windowBackground">
<android.support.v7.widget.Toolbar
android:id="@+id/mediapicker_toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:minHeight="?attr/actionBarSize"
android:background="?attr/conversation_list_toolbar_background"
android:theme="?attr/actionBarStyle" />
<android.support.v7.widget.RecyclerView
android:id="@+id/mediapicker_item_list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="2dp"
android:layout_marginTop="2dp" />
</LinearLayout>

View File

@@ -0,0 +1,60 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginRight="2dp"
android:layout_marginBottom="2dp">
<org.thoughtcrime.securesms.components.SquareImageView
android:id="@+id/mediapicker_image_item_thumbnail"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:scaleType="centerCrop"/>
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?mediapicker_image_outline" />
<FrameLayout
android:id="@+id/mediapicker_play_overlay"
android:layout_width="36dp"
android:layout_height="36dp"
android:background="@drawable/circle_white"
android:layout_gravity="center"
android:longClickable="false"
android:visibility="gone"
tools:visibility="visible">
<ImageView
android:layout_width="15dp"
android:layout_height="18dp"
android:layout_gravity="center"
android:layout_marginLeft="2dp"
android:tint="@color/core_blue"
android:scaleType="fitXY"
app:srcCompat="@drawable/triangle_right" />
</FrameLayout>
<FrameLayout
android:id="@+id/mediapicker_selected"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/transparent_black_90"
android:visibility="gone">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:src="@drawable/ic_check_white_24dp" />
</FrameLayout>
</FrameLayout>

View File

@@ -0,0 +1,183 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/core_black">
<org.thoughtcrime.securesms.components.ControllableViewPager
android:id="@+id/mediasend_pager"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<FrameLayout
android:id="@+id/mediasend_playback_controls_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:animateLayoutChanges="true"
android:layout_gravity="top"/>
<org.thoughtcrime.securesms.components.InputAwareLayout
android:id="@+id/mediasend_hud"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:orientation="vertical"
android:background="@color/transparent_black_70">
<org.thoughtcrime.securesms.components.emoji.EmojiEditText
android:id="@+id/mediasend_caption"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
style="@style/Signal.Text.Body"
android:paddingTop="11dp"
android:paddingBottom="11dp"
android:drawableLeft="@drawable/ic_add_caption"
android:drawableStart="@drawable/ic_add_caption"
android:drawablePadding="6dp"
android:maxLines="3"
android:maxLength="240"
android:hint="@string/MediaSendActivity_add_a_caption"
android:background="@null"/>
<android.support.v7.widget.RecyclerView
android:id="@+id/mediasend_media_rail"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
tools:layout_height="64dp"/>
<LinearLayout
android:id="@+id/mediasend_compose_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:orientation="horizontal"
android:paddingBottom="6dp">
<ImageView
android:id="@+id/mediasend_add_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:src="@drawable/ic_add_photo"
android:background="?selectableItemBackgroundBorderless"
android:visibility="gone"
tools:visibility="visible"/>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginLeft="8dp"
android:layout_marginStart="8dp"
android:paddingLeft="10dp"
android:paddingStart="10dp"
android:orientation="horizontal"
android:background="@drawable/compose_background_camera">
<org.thoughtcrime.securesms.components.emoji.EmojiToggle
android:id="@+id/mediasend_emoji_toggle"
android:layout_width="wrap_content"
android:layout_height="@dimen/conversation_compose_height"
android:layout_gravity="bottom"
android:paddingLeft="4dp"
android:paddingStart="4dp"
android:paddingRight="6dp"
android:paddingEnd="6dp"
android:background="?selectableItemBackgroundBorderless"
android:contentDescription="@string/conversation_activity__emoji_toggle_description" />
<Space
android:layout_width="0dp"
android:layout_height="@dimen/conversation_compose_height" />
<org.thoughtcrime.securesms.components.ComposeText
style="@style/ComposeEditText"
android:id="@+id/mediasend_compose_text"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:nextFocusForward="@+id/send_button"
android:nextFocusRight="@+id/send_button"
tools:hint="Send TextSecure message" >
<requestFocus />
</org.thoughtcrime.securesms.components.ComposeText>
</LinearLayout>
<FrameLayout
android:id="@+id/mediasend_send_button_bkg"
android:layout_width="@dimen/conversation_compose_height"
android:layout_height="@dimen/conversation_compose_height"
android:layout_marginLeft="12dp"
android:layout_marginStart="12dp"
android:layout_gravity="bottom"
android:background="@drawable/circle_tintable"
tools:backgroundTint="@color/core_blue">
<org.thoughtcrime.securesms.components.SendButton
android:id="@+id/mediasend_send_button"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:paddingTop="6dp"
android:paddingRight="6dp"
android:paddingBottom="6dp"
android:paddingLeft="11dp"
android:scaleType="fitCenter"
android:contentDescription="@string/conversation_activity__send"
android:src="?conversation_transport_sms_indicator"
android:background="@drawable/circle_touch_highlight_background" />
</FrameLayout>
</LinearLayout>
<TextView
android:id="@+id/mediasend_characters_left"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:paddingBottom="6dp"
android:visibility="gone"
tools:visibility="visible"
tools:text="160/160 (1)" />
<ViewStub
android:id="@+id/mediasend_emoji_drawer_stub"
android:layout="@layout/scribble_fragment_emojidrawer_stub"
android:inflatedId="@+id/emoji_drawer"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
</LinearLayout>
</org.thoughtcrime.securesms.components.InputAwareLayout>
<!--<com.pnikosis.materialishprogress.ProgressWheel-->
<!--android:id="@+id/mediasend_progress_wheel"-->
<!--android:layout_width="70dp"-->
<!--android:layout_height="70dp"-->
<!--android:visibility="gone"-->
<!--android:layout_gravity="center"-->
<!--app:matProg_barColor="@color/white"-->
<!--app:matProg_progressIndeterminate="true" />-->
</FrameLayout>

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