Commit Graph

71 Commits

Author SHA1 Message Date
Harris 6ddefb7a2e
Performance improvements and bug fixes (#869)
* refactor: fail on testSnode instead of recursively using up snode list. add call timeout on http client

* refactor: refactoring batch message receives and pollers

* refactor: reduce thread utils pool count to a 2 thread fixed pool. Do a check against pubkey instead of room names for oxenHostedOpenGroup

* refactor: caching lib with potential loader fixes and no-cache for giphy

* refactor: remove store and instead use ConcurrentHashMap with a backing update coroutine

* refactor: queue trim thread jobs instead of add every message processed

* fix: wrapping auth token and initial sync for open groups in a threadutils queued runnable, getting initial sync times down

* fix: fixing the user contacts cache in ConversationAdapter.kt

* refactor: improve polling and initial sync, move group joins from config messages into a background job fetching image.

* refactor: improving the job queuing for open groups, replacing placeholder avatar generation with a custom glide loader and archiving initial sync of open groups

* feat: add OpenGroupDeleteJob.kt

* feat: add open group delete job to process deletions after batch adding

* feat: add vacuum and fix job queue re-adding jobs forever, only try to set message hash values in DB if they have changed

* refactor: remove redundant inflation for profile image views throughout app

* refactor(wip): reducing layout inflation and starting to refactor the open group deletion issues taking a long time

* refactor(wip): refactoring group deletion to not iterate through and delete messages individually

* refactor(wip): refactoring group deletion to not iterate through and delete messages individually

* fix: group deletion optimisation

* build: bump build number

* build: bump build number and fix batch message receive retry logic

* fix: clear out open group deletes

* fix: update visible ConversationAdapter.kt binding for initial contact fetching and better traces for debugging background jobs

* fix: add in check for / force sync latest encryption key pair from linked devices if we already have that closed group

* Rename .java to .kt

* refactor: change MmsDatabase to kotlin to make list operations easier

* fix: nullable type

* fix: compilation issues and constants in .kt instead of .java

* fix: bug fix expiration timer on closed group recipient

* feat: use the job queue properly across executors

* feat: start on open group dispatcher-specific logic, probably a queue factory based on openGroupId if that is the same across new message and deletion jobs to ensure consistent entry and removal

* refactor: removing redundant code and fixing jobqueue per opengroup

* fix: allow attachments in note to self

* fix: make the minWidth in quote view bind max of text / title and body, wrapped ?

* fix: fixing up layouts and code view layouts

* fix: remove TODO, remove timestamp binding

* feat: fix view logic, avatars and padding, downloading attachments lazily (on bind), fixing potential crash, add WindowDebouncer.kt

* fix: NPE on viewModel recipient from removed thread while tearing down the Recipient observer in ConversationActivityV2.kt

* refactor: replace conversation notification debouncer handler with handlerthread, same as conversation list debouncer

* refactor: UI for groups and poller improvements

* fix: revert some changes in poller

* feat: add header back in for message requests

* refactor: remove Trace calls, add more conditions to the HomeDiffUtil for updating more efficiently

* feat: try update the home adapter if we get a profile picture modified event

* feat: bump build numbers

* fix: try to start with list in homeViewModel if we don't have already, render quotes to be width of attachment slide view instead of fixed

* fix: set channel to be conflated instead of no buffer

* fix: set unreads based off last local user message vs incrementing unreads to be all amount

* feat: add profile update flag, update build number

* fix: link preview thumbnails download on bind

* fix: centercrop placeholder in glide request

* feat: recycle the contact selection list and profile image in unbind

* fix: try to prevent user KP crash at weird times

* fix: remove additional log, improve attachment download success rate, fix share logs dialog issue
2022-06-08 17:12:34 +10:00
Harris e1b6bb7e56
Add one on one calls over clearnet (#864)
* feat: adding basic webrtc deps and test activity

* more testing code

* feat: add protos and bump version

* feat: added basic call functionality

* feat: adding UI and flipping cameras

* feat: add stats and starting call bottom sheet

* feat: hanging up and bottom sheet behaviors should work now

* feat: add call stats report on frontend

* feat: add relay toggle for answer and offer

* fix: add keep screen on and more end call message on back pressed / on finish

* refactor: removing and replacing dagger 1 dep with android hilt

* feat: include latest proto

* feat: update to utilise call ID

* feat: add stun and turn

* refactor: playing around with deps and transport types

* feat: adding call service functionality and permissions for calls

* feat: add call manager and more static intent building functions for WebRtcCallService.kt

* feat: adding ringers and more audio boilerplate

* feat: audio manager call service boilerplate

* feat: update kotlin and add in call view model and more management functions

* refactor: moving call code around to service and viewmodel interactions

* feat: plugging CallManager.kt into view model and service, fixing up dependencies

* feat: implementing more WebRtcCallService.kt functions and handlers for actions as well as lifecycle

* feat: adding more lifecycle vm and callmanager / call service functionality

* feat: adding more command handlers in WebRtcCallService.kt

* feat: more commands handled, adding lock manager and bluetooth permissions

* feat: adding remainder of basic functionality to services and CallManager.kt

* feat: hooking up calls and fixing broken dependencies and compile errors

* fix: add timestamp to incoming call

* feat: some connection and service launching / ring lifecycle

* feat: call establishing and displaying

* fix: fixing call connect flows

* feat: ringers and better state handling

* feat: updating call layout

* feat: add fixes to bluetooth and begin the network renegotiation

* feat: add call related permissions and more network handover tests

* fix: don't display call option in conversation and don't show notification if option not enabled

* fix: incoming ringer fix on receiving call, call notification priorities and notification channel update

* build: update build number for testing

* fix: bluetooth auto-connection and re-connection fixes, removing finished todos, allowing self-send call messages for deduping answers

* feat: add pre-offer information and action handling in web rtc call service

* refactor: discard offer messages from non-matching pre-offers we are already expecting

* build: build numbers and version name update

* feat: handle discarding pending calls from linked devices

* feat: add signing props to release config build

* docs: fix comment on time being 300s (5m) instead of 30s

* feat: adding call messages for incoming/outgoing/missed

* refactor: handle in-thread call notifications better and replace deny button intent with denyCallIntent instead of hangup

* feat: add a hangup via data channel message

* feat: process microphone enabled events and remove debuggable from build.gradle

* feat: add first call notification

* refactor: set the buttons to match iOS in terms of enable disable and colours

* refactor: change the call logos in control messages

* refactor: more bluetooth improvements

* refactor: move start ringer and init of audio manager to CallManager.kt and string fix up

* build: remove debuggable for release build

* refactor: replace call icons

* feat: adding a call time display

* refactor: change the call time to update every second

* refactor: testing out the full screen intents

* refactor: wrapper use corrected session description, set title to recipient displayName, indicate session calls

* fix: crash on view with a parent already attached

* refactor: aspect ratio fit preserved

* refactor: add wantsToAnswer ability in pre-init for fullscreenintent

* refactor: prevent calls from non hasSent participants

* build: update gradle code

* refactor: replace timeout schedule with a seconds count

* fix: various bug fixes for calls

* fix: remove end call from busy

* refactor: use answerCall instead of manual intent building again

* build: new version

* feat: add silenced notifications for call notification builder. check pre-offer and connecting state for pending connection

* build: update build number

* fix: text color uses overridden style value

* fix: remove wrap content for renderers and look more at recovering from network switches

* build: update build number

* refactor: remove whitespace

* build: update build number

* refactor: used shared number for BatchMessageReceiveJob.kt parameter across pollers

* fix: glide in update crash

* fix: bug fixes for self-send answer / hangup messages

* build: update build number

* build: update build.gradle number

* refactor: compile errors and refactoring to view binding

* fix: set the content to binding.root view

* build: increase build number

* build: update build numbers

* feat: adding base for rotation and picking random subset of turn servers

* feat: starting the screen rotation processing

* feat: setting up rotation for the remote render view

* refactor: applying rotation and mirroring based on front / rear cameras that wraps nicely, only scale reworking needed

* refactor: calls video stretching but consistent

* refactor: state machine and tests for the transition events

* feat: new call state processing

* refactor: adding reconnecting logic and visuals

* feat: state machine reconnect logic wip

* feat: add reconnecting and merge fixes

* feat: check new session based off current state

* feat: reconnection logic works correctly now

* refactor: reduce TIMEOUT_SECONDS to 30 from 90

* feat: reset peer connection on DC to prevent ICE messages from old connection or stale state in reconnecting

* refactor: add null case

* fix: set approved on new outgoing threads, use approved more deeply and invalidate the options menu on recipient modified. Add approvedMe flag toggles for visible message receive

* fix: add name update in action bar on modified, change where approvedMe is set

* build: increment build number

* build: update build number

* fix: merge compile errors and increment build number

* refactor: remove negotiation based on which party dropped connection

* refactor: call reconnection improvement tested cross platform to re-establish

* refactor: failed and disconnect events only handled if either the reconnect or the timeout runnables are not set

* build: update version number

* fix: reduce timeout

* fix: fixes the incoming hangup logic for linked devices

* refactor: match iOS styling for call activity closer

* chore: upgrade build numbers

* feat: add in call settings dialog for if calls is disabled in conversation

* feat: add a first call missed control message and info popup with link to privacy settings

* fix: looking at crash for specific large transaction in NotificationManager

* refactor: removing the people in case transaction size reduces to fix notif crash

* fix: comment out the entire send multiple to see if it fixes the issue

* refactor: revert to including the full notification process in a try/catch to handle weird responses from NotificationManager

* fix: add in notification settings prompt for calls and try to fall back to dirty full screen intent / start activity if we're allowed

* build: upgrade build number
2022-04-19 14:25:40 +10:00
Harris 5ace67fd36 fix: don't send typing indicator in unapproved conversation 2022-03-17 15:38:39 +11:00
ceokot c113a447cf
refactor: Use view binding to replace Kotlin synthetics (#824)
* refactor: Migrate home screen to data binding

* Add view binding

* Migrate ConversationView to view binding

* Migrate ConversationActivityV2 to view binding

* View model refactor

* Move more functionality to the view model

* Add ui state events flow

* Update conversation item bindings

* Update profile picture view bindings

* Replace Kotlin synthetics with view bindings

* Fix qr code fragment binding and optimize imports

* View binding refactors

* Make TextSecurePreferences an interface and add an implementation to improve testability

* Add conversation repository

* Migrate remaining TextSecurePreferences functions into the interface

* Add unit conversation unit tests

* Add unit test coverage for remaining view model functions
2022-01-14 07:56:15 +02:00
Harris 0516526923 refactor: use hilt to provide DB instead of our own factory, inject it in some places where possible 2021-10-04 18:51:19 +11:00
jubb 9b48d5d203 refactor: use simpler way to generate closed group profile pictures, limit the getConversation call in MentionManagerUtilities.kt to 200 to improve link-through performance to v2 conversation activity. fix notify type not being preloaded into settings 2021-08-03 13:36:04 +10:00
Harris 69e10caa10 refactor: revert glide cache strategy for separate task 2021-07-26 15:26:55 +10:00
Harris 0d0089e3d6 refactor: visible message view and user details bottom sheet updates individual recipient. Remove "none" notifications style 2021-07-26 13:44:04 +10:00
Niels Andriesse 3ac19e94fb Clean 2021-07-09 15:45:15 +10:00
Niels Andriesse dc790560fd Clean & debug 2021-07-09 13:56:38 +10:00
Niels Andriesse 9d447608da Re-organize files 2021-07-09 13:25:57 +10:00
Niels Andriesse c984d90b04 Re-organize files 2021-07-09 13:18:48 +10:00
Niels Andriesse 09502ee9ab Remove unused resources 2021-07-07 14:00:18 +10:00
Niels Andriesse 6ce37a6231 Remove unused code 2021-07-07 13:03:48 +10:00
jubb d98f34fa73 fix: only show loader if the message isn't failed, fix attachment upload and message send pending states in the conversation 2021-07-01 11:39:18 +10:00
Niels Andriesse 24b5fca7f8 Move ExpirationTimerView 2021-06-30 14:47:35 +10:00
jubb 60f9f0edfb fix: remove transfer controls from KThumbnailView.kt to prevent view stub being inflated 2021-06-29 13:35:46 +10:00
jubb 4498b6e00f Merge remote-tracking branch 'upstream/ui' into ui
# Conflicts:
#	app/src/main/java/org/thoughtcrime/securesms/conversation/v2/ConversationActivityV2.kt
#	app/src/main/java/org/thoughtcrime/securesms/conversation/v2/messages/VisibleMessageContentView.kt
#	app/src/main/java/org/thoughtcrime/securesms/conversation/v2/utilities/AttachmentManager.java
2021-06-28 11:39:11 +10:00
jubb 21835800ff feat: wiring up click listeners in AlbumThumbnailView.kt 2021-06-25 12:18:52 +10:00
Niels Andriesse cc98ab5c9f Send typing indicators & fix missing mention handling 2021-06-25 11:11:03 +10:00
jubb 620d063194 feat: adding text and shade, reverting other components to use old ThumbnailView 2021-06-25 09:57:58 +10:00
jubb b5f41b4383 Merge remote-tracking branch 'upstream/ui' into ui
# Conflicts:
#	app/src/main/java/org/thoughtcrime/securesms/components/AlbumThumbnailView.java
#	app/src/main/java/org/thoughtcrime/securesms/conversation/v2/ConversationActivityV2.kt
#	app/src/main/java/org/thoughtcrime/securesms/conversation/v2/messages/VisibleMessageContentView.kt
2021-06-24 16:26:45 +10:00
jubb 110391c2cd refactor: move new thumbnailview to utilities package 2021-06-24 16:25:43 +10:00
jubb 277c741851 feat: AlbumThumbnailView.kt view visible and binding to thumbnail slides 2021-06-24 16:15:13 +10:00
Niels Andriesse 32c2762d06 Make link preview view use thumbnail 2021-06-24 15:03:29 +10:00
Niels Andriesse ec8d4c9f5d Large emojis 2021-06-24 14:13:36 +10:00
Niels Andriesse 7373918d3d Add blocked dialog 2021-06-24 13:38:59 +10:00
Niels Andriesse 38710814e2 Show typing indicators 2021-06-24 11:22:32 +10:00
nielsandriesse 7e9116df9c Clean up MessageRecord 2021-05-31 16:20:46 +10:00
nielsandriesse 1952b0e3be Clean up DisplayRecord 2021-05-31 15:53:25 +10:00
Niels Andriesse e7ae08fe7a Clean 2021-05-24 10:27:31 +10:00
Niels Andriesse 49c3ffd9ca Remove redundant code 2021-05-21 15:02:34 +10:00
Niels Andriesse 6243443262 Move files 2021-05-18 16:11:38 +10:00
Niels Andriesse 4078a9c4b5 Move files 2021-05-18 16:03:47 +10:00
Niels Andriesse c9ebcc580f Move files 2021-05-18 09:26:08 +10:00
Niels Andriesse a88322a033 Move files 2021-05-18 09:12:33 +10:00
Niels Andriesse 7150374c94 Clean 2021-04-27 14:26:26 +10:00
Niels Andriesse 69f05dabdf Clean 2021-04-26 11:23:09 +10:00
Ryan ZHAO aa7071ad80 send typing indicator using new pipeline 2021-03-04 15:57:01 +11:00
Ryan ZHAO d9eaedd6ae hook up sending pipeline & clean 2021-03-02 12:24:09 +11:00
Ryan ZHAO ff36fbb6a1 further cleaning up on stickers 2021-02-23 15:07:31 +11:00
Ryan ZHAO 5b15decdd6 further cleaning on signal sticker 2021-02-22 15:07:16 +11:00
Ryan ZHAO b2225697b4 WIP: clean up unused signal stuff 2021-02-22 14:58:06 +11:00
Ryan ZHAO 0ec940ea32 clean up location 2021-02-22 13:30:48 +11:00
Ryan ZHAO 19a829d011 WIP: clean up signal protocols (stickers) 2021-02-22 10:06:40 +11:00
Ryan ZHAO 735cceafdb clean up spam exception logs 2021-02-19 11:11:58 +11:00
Ryan ZHAO 20ec889730 clean up V1 closed group 2021-02-17 16:09:36 +11:00
Ryan ZHAO 7a17b5769a clean up V1 multi device 2021-02-17 12:27:00 +11:00
Ryan ZHAO 6c857e203b clean 2021-02-04 10:28:51 +11:00
ryanzhao 307da3b2be clean logging 2021-02-03 12:22:40 +11:00