Commit graph

68 commits

Author SHA1 Message Date
ryanzhao
89545f0406 further clean up 2023-05-10 15:36:10 +10:00
Ryan Zhao
2ceb9e2bf4 clean up old job manager 2023-05-08 12:29:21 +10:00
ryanzhao
375815c719 WIP: refactor on jobs using old job table 2023-05-05 16:51:44 +10:00
Ryan Zhao
51856138e3 refactor on SignalAudioManager 2023-04-24 15:38:06 +10:00
Morgan Pretty
eb739bdc9b
ANR Defensive Coding (#1132)
* Made a number of changes to try and improve background ANRs

Added some more logs to the BatchMessageReceiveJob (to make it easier to track a specific job)
Shifted the ConversationActivity adapter initialisation to run on a background thread to reduce the hang when opening a conversation
Updated the ConversationViewModel to cache the recipient and openGroup values to avoid accessing the database unnecessarily
Updated the code to just stop all current closed group pollers instead of fetching a list to stop
Updated the PN registration to be triggered in an AsyncTask
Updated the call code to unregister a couple of additional receivers
Updated the background poller so it waits for 15 mins before running and doesn't replace the existing scheduler (allows for PNs to trigger explicit background polling)
Fixed an issue where we were sending push notifications which were too large and likely to fail as a result (non-pre-offer call messages)
Fixed an issue where a failing Open Group poller could prevent the background poller from receiving and processing DMs

* Updated to a more coroutine-y convention
2023-03-31 13:24:36 +11:00
Morgan Pretty
5e28af2be4
Updated the code to use the network offset time everywhere relevant (#1111)
* Updated the code to use the network offset time everywhere relevant

* Updated the SnodeAPI.nowWithOffset to use @JvmStatic
2023-03-31 10:11:30 +11:00
Morgan Pretty
694ca79958 Added the unread mention indicator to the conversation list
Fixed the unread indicator colours to match correct theming designs
Fixed a bug where the unread count could be incorrect when receiving UnsendRequests within the same poll
Added a couple missing theme colours
2023-01-19 15:24:50 +11:00
0x330a
cdd2559839
Paged conversation recycler, update compile sdk version 31 (#1049)
* Update build tools

* Update appcompat version

* Update dependencies

* feat: add paging into conversation recycler and queries to fetch data off-thread

* refactor: wip for updating paged results and bucketing messages / fetching enough to display

* fix: currently works for scrolling and possibly refreshing? need scroll to message and auto scroll down on insert (at bottom)

* fix: search and scrolling to X message works now

* build: increase version code and name

* fix: re-add refresh, remove the outdated comment

* refactor: lets see if 25 size pages increases performance 👀

* feat: add in some equals overrides for mms records to refresh if media has finished DLing

* feat: add scroll to bottom for new messages if we are at the end of the chat

* build: update build numbers

* fix: update AGP and fix compile errors for sdk version 31

* feat: add log for loki-avatar and loki-fs on upload types and responses

* feat: increase build number to match latest installed version

* feat: changing props and permission checks for call service

* fix: possible service exception when no call ID remote foreground service not terminated

* revert: google services version

* fix: re-add paging dependency

* feat: adding new last seen function and figuring out the last seen for recycler adapter

* build: update version names and codes for deploy

* refactor: undo the new adapter and query changes to use previous cursor logic. revert this commit to enable new paged adapter

* fix: use author's address in typist equality and hashcode for set inclusion

* refactor: refactor the select contacts activity

* refactor: refactor the select contacts activity

* build: update version code

* fix: hide all other bound views if deleted

* refactor: change voice message tint, upgrade build number

* fix: message detail showing up properly

* revert: realise copy public key is actually not allowed if open group participant

* fix: copy session ID, message detail activity support re-enabled

* build: update build version code

* build: remove version name

* build: update build code

* feat: google services version minimum compatible

* fix: selection for re-created objects not properly highlighting

* fix: foreground CENTER_INSIDE instead of just CENTER for scaletype

* build: update version code

* fix: don't show error if no error

* build: update version code

* fix: clear error messages if any on successful send

Co-authored-by: charles <charles@oxen.io>
2022-12-19 11:29:05 +11:00
ceokot
1dbcffe40b
Play fixes (#1017)
* fix: Prevent crash from recipient modification listener

* fix: Add message selection highlight color

* Handle crash from fingerprint auth

* Update message selection highlight colors

* Handle call answer/hangup processing appropriately

* Add proguard rule for ContextMenuList

* Handle more calls intents

Co-authored-by: charles <charles@oxen.io>
2022-10-24 14:24:57 +11:00
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
ceokot
206505abe8
feat: Add conversation filtering for message requests (#830)
* feat: Message requests

* Apply contact sync message

* Filter based on message requests toggle

* Add message requests screen

* Implement message requests screen

* Handle message request buttons

* Handle approval syncing

* Display message request response

* Display pending message request

* Display pending message request

* Add approval migrations

* Send message request response

* Fix conversation filters

* Add approval migration

* Handle message request response

* Update message request response proto

* Update message request response handling

* Refresh message requests

* Show message request banner on new message request

* Message request item layout tweaks

* Fix latest unapproved conversation query

* Handle sent message request responses on restore

* QA feedback tweaks

* Remove send limit on message requests

* Config message handling tweaks

* Reverse conversation upon message request approval

* Remove read receipts, delete declined conversations

* Fix contact filtering in config messages

* Fix message request order and handle deletion

* Fix message request snippet on home screen

* Refresh message request list after decline or clearing all

* Fix message request reversal

* Fix message request notifications

* Disable media buttons for message requests

* Hide message request banner after reading

* Refresh message request banner
2022-03-04 08:46:39 +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
ryanzhao
ee3e9ae17f delete outgoing message for linked device 2021-08-16 09:58:28 +10:00
Niels Andriesse
a9b5c269f6 Re-organize files & delete unused code 2021-07-09 11:14:21 +10:00
nielsandriesse
f872c2b9be Prepare for OGS timestamp handling changes 2021-05-31 11:23:37 +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
c1548a4e51 Move files 2021-05-18 09:50:16 +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
Ryan ZHAO
4508510958 fix for API 21 2021-04-29 13:23:02 +10:00
Ryan ZHAO
951e6f6e0c Merge branch 'dev' of https://github.com/oxen-io/session-android into screenlock-timeout 2021-04-22 09:16:43 +10:00
Ryan ZHAO
1e40c861d1 make screenlock work within 60s 2021-04-20 17:02:14 +10:00
Brice-W
66e811ed75 Merge branch 'specific-group-updates' into data-extraction-2 2021-04-20 15:42:04 +10:00
Brice-W
c8f42d3b8e Merge branch 'dev' of https://github.com/loki-project/session-android into data-extraction-2 2021-04-16 09:11:01 +10:00
Brice-W
abb1db7a7e new approach in update saving 2021-04-15 14:41:29 +10:00
Brice-W
418363fdea Merge branch 'dev' of https://github.com/loki-project/session-android into specific-group-updates 2021-04-14 16:37:57 +10:00
Brice-W
9cdcdc43a6 redesign of group update messages management 2021-04-14 16:37:04 +10:00
nielsandriesse
d1f00b6d77 Don't run local backup jobs for now 2021-04-14 10:04:25 +10:00
Brice-W
df0ca11ec5 Merge branch 'dev' of https://github.com/loki-project/session-android into specific-group-updates 2021-04-12 14:26:13 +10:00
Brice-W
db415f371a Merge branch 'dev' of https://github.com/loki-project/session-android into data-extraction-2 2021-04-09 16:30:36 +10:00
Brice-W
30b47a32cb Merge branch 'dev' of https://github.com/loki-project/session-android into specific-group-updates 2021-04-08 15:21:46 +10:00
Brice-W
d027d0c640 Merge branch 'dev' of https://github.com/loki-project/session-android into data-extraction-2 2021-04-08 15:00:31 +10:00
Brice-W
dd3d962dea fix expiration timers updates for groups 2021-04-08 12:07:23 +10:00
Brice-W
04f295ac6c expiration timer updates handled as outgoing messages for multi device 2021-04-07 10:40:45 +10:00
Brice-W
ef3bef787d expiration timer handling updated 2021-03-25 14:55:23 +11:00
Brice-W
28cecc0236 expiration timer messages generation updated 2021-03-23 09:58:17 +11:00
Brice-W
471e028cf3 implementation of the receiving side of Data Extraction notifications & explicit group updates notifications 2021-03-16 14:56:47 +11:00
Ryan ZHAO
54da77a89b clean 2021-03-12 15:23:29 +11:00
Ryan ZHAO
9ddb45dbdc fix blocked contacts can still see typing indicator and set disappearing messages 2021-03-11 10:52:54 +11:00
Ryan ZHAO
e0ff5a7e7a fix sending expiration update message 2021-03-04 17:14:12 +11:00
Ryan ZHAO
d9eaedd6ae hook up sending pipeline & clean 2021-03-02 12:24:09 +11:00
Ryan ZHAO
bc5a1ce396 fix screen lock 2021-02-25 09:35:57 +11:00
Ryan ZHAO
6f002311b8 clean up unused message types 2021-02-23 16:23:45 +11:00
Ryan ZHAO
5db7f0ecb8 clean up signal database 2021-02-23 09:46:56 +11:00
Ryan ZHAO
c5ab13aadf clean up deprecated message connection 2021-02-22 16:29:48 +11:00
Ryan ZHAO
19a829d011 WIP: clean up signal protocols (stickers) 2021-02-22 10:06:40 +11:00
Ryan ZHAO
04f140ee09 WIP: clean up signal service protos 2021-02-22 09:31:29 +11:00
Ryan ZHAO
958ec690f1 WIP: clean up signal protocols 2021-02-19 11:03:58 +11:00