Commit graph

4590 commits

Author SHA1 Message Date
Marcel Hibbe
bb53982dd1
use CallRecordingRepository
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-01-31 15:55:06 +01:00
Marcel Hibbe
6365554692
add isCallRecordingAvailable
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-01-31 15:55:06 +01:00
Marcel Hibbe
17f8144dc7
add system messages for call recording
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-01-31 15:55:06 +01:00
Marcel Hibbe
c663035080
add recording related buttons to call screen
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-01-31 15:55:05 +01:00
Nextcloud bot
f742e7e6f1
Fix(l10n): 🔠 Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-01-31 03:52:34 +00:00
Nextcloud bot
69504dc112
Fix(l10n): 🛠️ Update Transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-01-31 03:52:15 +00:00
Nextcloud bot
5bc0fe4105
Fix(l10n): 🔠 Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-01-30 03:48:53 +00:00
Nextcloud bot
20a408411a
Fix(l10n): 🛠️ Update Transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-01-30 03:48:34 +00:00
Nextcloud bot
aded623d46
Fix(l10n): 🔠 Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-01-29 03:43:25 +00:00
Nextcloud bot
864db21c75
Fix(l10n): 🛠️ Update Transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-01-29 03:43:05 +00:00
Nextcloud bot
4301f50850
Fix(l10n): 🔠 Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-01-28 03:46:00 +00:00
Nextcloud bot
7cefe47b01
Fix(l10n): 🛠️ Update Transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-01-28 03:45:39 +00:00
Nextcloud bot
54fa76da4b
Fix(l10n): 🔠 Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-01-27 06:50:33 +00:00
Nextcloud bot
10d0c89073
Fix(l10n): 🛠️ Update Transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-01-27 03:52:42 +00:00
Nextcloud bot
343d8a37f8
Fix(l10n): 🔠 Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-01-26 04:01:45 +00:00
Nextcloud bot
bd964825b6
Fix(l10n): 🛠️ Update Transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-01-26 04:01:26 +00:00
Marcel Hibbe
86290d8f80
improve voice message quality
first it was tried with sampling rate 44100 but this showed an error on safari when try to playback.

by direct comparison to 44100, 22050 has lower quality but it's totally okay compared to the quality before when no sampling rate was set. I'm not sure why it failed on safari, because the iOS app also uses 44100.

see https://github.com/nextcloud/talk-android/pull/2714

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-01-25 11:42:56 +01:00
Nextcloud bot
e6757f397e
Fix(l10n): 🔠 Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-01-25 03:59:24 +00:00
Nextcloud bot
3d307f861e
Fix(l10n): 🛠️ Update Transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-01-25 03:59:05 +00:00
Nextcloud bot
eca47b8bc7
Fix(l10n): 🔠 Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-01-24 03:41:19 +00:00
Nextcloud bot
5f78eb5fc0
Fix(l10n): 🛠️ Update Transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-01-24 03:41:00 +00:00
Nextcloud bot
7d893cdbb9
Fix(l10n): 🔠 Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-01-23 03:44:13 +00:00
Nextcloud bot
72ecd9b8bd
Fix(l10n): 🛠️ Update Transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-01-23 03:43:54 +00:00
Nextcloud bot
db5e26d7d5
Fix(l10n): 🔠 Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-01-22 03:39:57 +00:00
Nextcloud bot
6ab03e469a
Fix(l10n): 🛠️ Update Transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-01-22 03:39:39 +00:00
Nextcloud bot
c57265ccfa
Fix(l10n): 🔠 Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-01-21 04:03:49 +00:00
Nextcloud bot
0717133653
Fix(l10n): 🛠️ Update Transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-01-21 04:03:30 +00:00
Marcel Hibbe
11d089485e
avoid NPE when answering call
this could happen very rarely when clicking very fast to accept the call before the conversation was set.

Exception java.lang.NullPointerException:
  at com.nextcloud.talk.activities.CallNotificationActivity.proceedToCall (CallNotificationActivity.kt:156)
  at com.nextcloud.talk.activities.CallNotificationActivity.initClickListeners$lambda$0 (CallNotificationActivity.kt:126)
  at com.nextcloud.talk.activities.CallNotificationActivity.$r8$lambda$0cnB_UmYcTD4PyxIBSZCZs1m_6s
  at com.nextcloud.talk.activities.CallNotificationActivity$$ExternalSyntheticLambda0.onClick
  at android.view.View.performClick (View.java:6612)
  at android.view.View.performClickInternal (View.java:6581)
  at android.view.View.access$3100 (View.java:785)
  at android.view.View$PerformClick.run (View.java:25904)
  at android.os.Handler.handleCallback (Handler.java:873)
  at android.os.Handler.dispatchMessage (Handler.java:99)
  at android.os.Looper.loop (Looper.java:280)
  at android.app.ActivityThread.main (ActivityThread.java:6706)
  at java.lang.reflect.Method.invoke
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:493)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:858)

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-01-20 09:31:44 +01:00
Marcel Hibbe
aec1f63da2 avoid NPE on hangup
Exception java.lang.NullPointerException:
  at com.nextcloud.talk.activities.CallActivity.hangupNetworkCalls (CallActivity.java:1749)
  at com.nextcloud.talk.activities.CallActivity.hangup (CallActivity.java:1741)
  at com.nextcloud.talk.activities.CallActivity.lambda$initClickListeners$8$com-nextcloud-talk-activities-CallActivity (CallActivity.java:465)
  at com.nextcloud.talk.activities.CallActivity$$ExternalSyntheticLambda16.onClick
  at android.view.View.performClick (View.java:7792)
  at android.view.View.performClickInternal (View.java:7769)
  at android.view.View.access$3800 (View.java:910)
  at android.view.View$PerformClick.run (View.java:30218)
  at android.os.Handler.handleCallback (Handler.java:938)
  at android.os.Handler.dispatchMessage (Handler.java:99)
  at android.os.Looper.loopOnce (Looper.java:226)
  at android.os.Looper.loop (Looper.java:313)
  at android.app.ActivityThread.main (ActivityThread.java:8751)
  at java.lang.reflect.Method.invoke
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:571)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1135)

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-01-20 08:10:05 +00:00
Nextcloud bot
7b60780ec5
Fix(l10n): 🔠 Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-01-20 03:43:15 +00:00
Nextcloud bot
7db09f5b2d
Fix(l10n): 🛠️ Update Transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-01-20 03:42:57 +00:00
Nextcloud bot
495e5aed2d
Fix(l10n): 🔠 Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-01-20 02:32:39 +00:00
Nextcloud bot
11d79737de
Fix(l10n): 🛠️ Update Transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-01-20 02:32:19 +00:00
Marcel Hibbe
002aeb0b9d
fix to show author above location map
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-01-19 11:10:58 +01:00
Marcel Hibbe
3e0026d49d
fix to always show author name in group conversations
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-01-19 11:10:18 +01:00
Daniel Calviño Sánchez
53c9c1cf8c Do not create offer for received screen share
When the HPB is not used and a PeerConnectionWrapper is created it
always sent an offer if the local session ID is higher than the remote
session ID. However, in the case of screen shares the participant
sharing the screen always sends an offer, no matter the session ID.
Therefore, when that offer was received the new PeerConnectionWrapper
object sent a new offer, which in turn created an extra connection in
the browser.

Although the screen share connection happens to work the underlying
behaviour was wrong, so now no offer is sent for received screen share
connections and it is always waited until the offer is sent by the other
participant.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2023-01-18 15:16:53 +00:00
Marcel Hibbe
4ccf8ac5a2
move logic to getPayloadForImageLoader
logic for setting the placeholder was moved to getPayloadForImageLoader.
This is a better solution than in commit
9557bec9 where the onBind method had to be called in between other code.

This is still not the best solution because getPayloadForImageLoader now contains more logic than it should (which is also not only responsible for the placeholder). Anyway as this is a hotfix it's the best solution for the moment.

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-01-18 10:18:29 +01:00
Marcel Hibbe
ffcd56375e
fix to hide avatars in one to one conversations.
follow up to commit 7464e6994b673d2b575903a76752bf39bed9d622

the problem was that the "super" methods also contain logic to show/hide the avatar. So this result must be overwritten again after calling the super method.

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-01-18 10:18:28 +01:00
Marcel Hibbe
90d3d7d217
fix to show placeholder image if vcf contact has no photo
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-01-18 10:18:28 +01:00
Marcel Hibbe
99c6d77b17
set fallback placeholder for loadImage
set fallback placeholder if somehow null was passed as a placeholder

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-01-18 10:18:28 +01:00
Marcel Hibbe
5ba6148273
fix to immediately view placeholder + set min height
without this fix, "getPayloadForImageLoader" was called before the placeholder was set (so it was null until getPayloadForImageLoader was called again after ~30seconds.). This is fixed by calling the super method at the end of "onBind".

min height was set to avoid very tiny previews (like for the placeholders)

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-01-18 10:18:28 +01:00
Marcel Hibbe
2ddb0782f3
fix to set placeholder images in chat
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-01-18 10:18:28 +01:00
Nextcloud bot
1a334c8861
Fix(l10n): 🔠 Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-01-18 03:39:04 +00:00
Nextcloud bot
e5f5e4bbaa
Fix(l10n): 🛠️ Update Transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-01-18 03:38:46 +00:00
Marcel Hibbe
1d9868daa6
remove try-catch for NPEs for bindings
since null checks are done for the nullable bindings by PR #2694, the try-catch blocks arent necessary anymore.

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-01-17 08:37:42 +01:00
Marcel Hibbe
b95399750d
simplify ControllerViewBindingDelegate
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-01-17 08:12:18 +01:00
Marcel Hibbe
b45794b0ca
remove withNullableControllerViewBinding
it seems async calls are not cancelled reliable so it was decided to always check for null bindings to avoid NPEs

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-01-17 08:12:18 +01:00
Marcel Hibbe
4124a65c7a
make ControllerViewBindingDelegate nullable
check nullable bindings in all controllers

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-01-17 08:12:17 +01:00
Nextcloud bot
08d64c7298
Fix(l10n): 🔠 Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-01-17 03:39:13 +00:00
Nextcloud bot
9dbe452304
Fix(l10n): 🛠️ Update Transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-01-17 03:38:55 +00:00
Daniel Calviño Sánchez
67e259f792 Simplify ending the peer connections
The peer connections will be of either "video" or "screen" type, so they
can be simply removed based on the session id and an explicit type.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2023-01-16 09:05:51 +00:00
Daniel Calviño Sánchez
9ae969b0f8 Split call participants and peer connections
Instead of trying to create a video peer connection for any joined
participant now only a call participant is created for any joined
participant, and a video peer connection is created only for those
participants that are publishing audio or video.

If a call participants does not have a video peer connection the call
participant is now seen as "connected" from the UI, as there is no need
to show a progress bar for that participant.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2023-01-16 09:05:51 +00:00
Daniel Calviño Sánchez
2cb7572dbc Extract methods to add and remove call participants
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2023-01-16 09:05:51 +00:00
Daniel Calviño Sánchez
ed5e8fc82e Use helper class to keep track of the participants in a call
As CallParticipantList starts listening on the signaling messages as
soon as it is created it needs to be created and destroyed right before
entering and exiting a call. Otherwise it could receive messages on
other states (for example, while the "connection timeout" message is
shown) and thus once the local participant joined the event would not
include the other participants already in the call as joined (although
they would be anyway reported as unchanged).

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2023-01-16 09:05:51 +00:00
Daniel Calviño Sánchez
ab72db7a10 Add helper class to keep track of the participants in a call
For now only the same signaling messages that were already handled are
still handled; in the future it could be extended to handle other
messages, like the one sent by the external signaling server when a
participant leaves the room (in some cases no participants update
message is sent if the participant leaves the call and room at the same
time, which causes the participants to still be seen as in call until a
new update is received).

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2023-01-16 09:05:51 +00:00
Daniel Calviño Sánchez
0a3f515bb6 Observe only the self peer connection
The observers were created for any peer connection, but after recent
changes they ignored all changes but those from the self peer
connection. Therefore it is enough to just add an explicit listener on
that peer connection rather than on all of them.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2023-01-16 09:05:51 +00:00
Daniel Calviño Sánchez
6728e3f063 Do not handle connection state changes to "closed"
The connection state changes to "closed" only when the connection is
closed. However, closing a connection does not fire any event (not even
the "iceConnectionStateChanged" event), so the event handler can be
removed as it will never be executed.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2023-01-16 09:05:51 +00:00
Daniel Calviño Sánchez
534bbddc88 Create and destroy ParticipantDisplayItems based on call participants
The ParticipantDisplayItems were created and destroyed based on the peer
connections. Now a ParticipantDisplayItem of "video" type is associated
to a call participant, while an additional item is created and destroyed
depending on the state of the screen peer connection of the call
participant.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2023-01-16 09:05:51 +00:00
Daniel Calviño Sánchez
e17a999812 Rename methods to add and remove ParticipantDisplayItems
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2023-01-16 09:05:51 +00:00
Daniel Calviño Sánchez
5681084a14 Create and destroy helper listeners based on call participants
The listeners for call participant messages and for the call participant
nick provided by offers / answers were created and destroyed based on
the peer connections, although they were implicitly associated to a call
participant. Now they are explicitly created and destroyed based on its
associated call participant.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2023-01-16 09:05:51 +00:00
Daniel Calviño Sánchez
175944e932 Move handling of call participants to its own class
CallParticipant provides a read-only CallParticipantModel and internally
handles the data channel and peer connection events that modify the
model. Nevertheless, the CallParticipant requires certain properties to
be externally set, like the userId or the peer connections.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2023-01-16 09:05:50 +00:00
Daniel Calviño Sánchez
4aef76e347 Keep track of the stream in the peer connection
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2023-01-16 09:05:50 +00:00
Daniel Calviño Sánchez
18f21c4f48 Update ParticipantDisplayItem from CallParticipantModel
Instead of explicitly setting the values on the ParticipantDisplayItems
now the values are set on the CallParticipantModels, and the items are
automatically updated from their model when they change.

Different items are still used for the audio/video and screen shares of
the same participant, so the type is used to select from which
properties of the model is the item updated.

As the model may be updated from background threads it is explicitly
observed by the items from the main thread using a Handler shared by all
the items.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2023-01-16 09:05:50 +00:00
Daniel Calviño Sánchez
d72648379e Add model for (remote) call participants
Clients that modify the model would define the variables using the
mutable subclass, while clients that only need to access the model are
expected to use the read-only base class.

The read-only class provides an observer; as it is expected that the
model will be modified from background threads but observed from the
main thread the observer can be registered along a handler to be
notified on its thread, independently of on which thread the values were
set.

Currently there does not seem to be a need to observe each value on its
own, so the observer is notified in a coarse way when any value changes.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2023-01-16 09:05:50 +00:00
Daniel Calviño Sánchez
8a316d94f5 Notify that data set changed automatically when display item changes
Instead of explicitly calling "notifyDataSetChanged" after setting
values on a ParticipantDisplayItem now the adapter observes all its
items and calls "notifyDataSetChanged" automatically when any of them
changes.

Although this adds some boilerplate code it will make possible to update
the ParticipantDisplayItems and automatically propagate the changes to
the adapter when a model changes, rather than having to explicitly do it
from the CallActivity.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2023-01-16 09:05:50 +00:00
Daniel Calviño Sánchez
d67b04dff8 Reorder attributes
Generic final attributes first, followed by object specific final
attributes and then other object attributes.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2023-01-16 09:05:50 +00:00
Daniel Calviño Sánchez
5fe9154c9a Declare attributes set just once in constructor as "final"
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2023-01-16 09:05:50 +00:00
Daniel Calviño Sánchez
e887fde2a3 Remove unused getters and setters
Note that the session ID, user ID and the stream type attributes are
still kept, as they can be useful to identify the instance when
debugging.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2023-01-16 09:05:50 +00:00
Daniel Calviño Sánchez
339d65dff8 Handle the raw ICE connection state in the views
Rather than just providing a coarse "connected" or "not connected" value
now the views receive the raw ICE connection state. Combined with other
properties this will make possible to show a finer grained status (like
done in the WebUI), although for now just "connected" or "not connected"
is still shown as before.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2023-01-16 09:05:50 +00:00
Nextcloud bot
ee0dadaf02
Fix(l10n): 🔠 Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-01-16 03:39:10 +00:00
Nextcloud bot
2efa5bb72e
Fix(l10n): 🛠️ Update Transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-01-16 03:38:52 +00:00
Nextcloud bot
a635078adb
Fix(l10n): 🔠 Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-01-15 03:35:52 +00:00
Nextcloud bot
4fb163aea0
Fix(l10n): 🛠️ Update Transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-01-15 03:35:33 +00:00
Nextcloud bot
bd3784c03c
Fix(l10n): 🔠 Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-01-14 03:37:48 +00:00
Nextcloud bot
95f6be8b6c
Fix(l10n): 🛠️ Update Transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-01-14 03:37:29 +00:00
Nextcloud bot
94628b700e
Fix(l10n): 🔠 Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-01-13 03:52:28 +00:00
Nextcloud bot
66033adfa0
Fix(l10n): 🛠️ Update Transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-01-13 03:52:07 +00:00
Nextcloud bot
e81461ba80
Fix(l10n): 🔠 Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-01-12 03:38:17 +00:00
Nextcloud bot
2a247e50ea
Fix(l10n): 🛠️ Update Transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-01-12 03:37:57 +00:00
Nextcloud bot
f0070f09e6
Fix(l10n): 🔠 Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-01-11 03:39:46 +00:00
Nextcloud bot
2317df8625
Fix(l10n): 🛠️ Update Transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-01-11 03:39:27 +00:00
Nextcloud bot
2c9267be43
Fix(l10n): 🔠 Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-01-10 03:43:36 +00:00
Nextcloud bot
1df26c1b48
Fix(l10n): 🛠️ Update Transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-01-10 03:43:17 +00:00
Nextcloud bot
964bf17dac
Fix(l10n): 🔠 Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-01-09 03:40:45 +00:00
Nextcloud bot
0f11b50430
Fix(l10n): 🛠️ Update Transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-01-09 03:40:25 +00:00
Nextcloud bot
be17f8a0ef
Fix(l10n): 🔠 Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-01-08 03:37:19 +00:00
Nextcloud bot
bec815ecad
Fix(l10n): 🛠️ Update Transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-01-08 03:36:59 +00:00
Nextcloud bot
4af5f7fa57
Fix(l10n): 🔠 Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-01-07 03:37:13 +00:00
Nextcloud bot
14017ae8e4
Fix(l10n): 🛠️ Update Transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-01-07 03:36:52 +00:00
Nextcloud bot
3f4c2eb3a8
Fix(l10n): 🔠 Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-01-06 03:39:04 +00:00
Nextcloud bot
a574f93112
Fix(l10n): 🛠️ Update Transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-01-06 03:38:44 +00:00
Nextcloud bot
a1b5209269
Fix(l10n): 🔠 Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-01-05 03:38:53 +00:00
Nextcloud bot
d99fb4674e
Fix(l10n): 🛠️ Update Transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-01-05 03:38:32 +00:00
Nextcloud bot
2b06d0ee41
Fix(l10n): 🔠 Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-01-04 06:12:38 +00:00
Nextcloud bot
ef9e7d26f5
Fix(l10n): 🛠️ Update Transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-01-04 06:11:33 +00:00
Nextcloud bot
d6e4c35b37
Fix(l10n): 🔠 Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-01-03 05:47:21 +00:00
Nextcloud bot
6c768158b5
Fix(l10n): 🛠️ Update Transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-01-03 05:46:38 +00:00
Andy Scherzinger
23f94a88a8
Added license header
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-12-30 16:58:45 +01:00
Andy Scherzinger
4574024aae
Add deprecation messages for newly added Kotlin migrations
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-12-30 16:58:44 +01:00
Andy Scherzinger
bb6cb228a7
use improt alias to enforce use of kotlin map function
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-12-30 16:58:44 +01:00
Andy Scherzinger
0fa26cc137
Update to specific kotlin syntax since Java8 and Kotlin 1.8 collide now
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-12-30 16:58:43 +01:00
Andy Scherzinger
36744542e6
Suppress Linter since performOnCLick is called within touch event implementation
... else it would be called twice -> false-positive

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-12-30 16:58:43 +01:00
Andy Scherzinger
eaf12ef4b5
Add new line at the end of kotlin file
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-12-30 16:58:42 +01:00
Andy Scherzinger
95c3123727
Migrate to new parcelize Implementation for Kotlin 1.8, also extend chatKit MessageInput to provide access to UI elements of that component
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-12-30 16:58:42 +01:00
Nextcloud bot
97b1735ffd
Fix(l10n): 🔠 Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-12-30 10:17:31 +00:00
Nextcloud bot
9c3c48f881
Fix(l10n): 🛠️ Update Transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-12-30 10:15:41 +00:00
Nextcloud bot
1e4a5ec913
Fix(l10n): 🔠 Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-12-29 11:23:14 +00:00
Nextcloud bot
b38213d2a1
Fix(l10n): 🛠️ Update Transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-12-29 11:21:03 +00:00
Andy Scherzinger
2ca13f4649
Spotbugs: Defere NPE
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-12-29 11:37:20 +01:00
Andy Scherzinger
b36195dc9a
UI binding can never be null
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-12-29 11:37:20 +01:00
Andy Scherzinger
9ae722659f
Spotbugs: don't doubleCheck Map contains value, just check for null
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-12-29 11:37:19 +01:00
Andy Scherzinger
efdfe83507
Spotbugs: remove NPE deference
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-12-29 11:37:19 +01:00
Andy Scherzinger
8b9996814f
Spotbugs: NPE deference, NPE-equals, unused variable, make vars final, reformat code for line-length 120 chars
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-12-29 11:37:19 +01:00
Andy Scherzinger
a33f3fe400
Spotbug: Simple field is used like an enum
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-12-29 11:37:18 +01:00
Andy Scherzinger
f48575bfec
Spotbug: Method stores return result in local before immediately returning it
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-12-29 11:37:18 +01:00
Andy Scherzinger
c5067b7a60
Spotbug: split message processing to reduce complexity
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-12-29 11:37:00 +01:00
Andy Scherzinger
7b86b02c21
Spotbugs prevent NPR deference
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-12-29 11:37:00 +01:00
Andy Scherzinger
08936279b6
codacy: inefficient use of StringBuffer.toString using call StringBuffer.length instead
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-12-29 11:37:00 +01:00
Andy Scherzinger
b07ee434fe
housekeeping: cleanup after spotbug fixes
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-12-29 11:36:59 +01:00
Andy Scherzinger
8b61808fda
Spotbug: make constructor-called methods final
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-12-29 11:36:59 +01:00
Andy Scherzinger
09012cce6a
Spotbugs: remove superclass field masking fields inherited from BaseActivity
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-12-29 11:36:59 +01:00
Andy Scherzinger
093e6a15bc
Spotbugs: proper equals and hashCode
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-12-29 11:36:58 +01:00
Andy Scherzinger
bf8c113f9a
Spotbugs: prevent possible NPE deference
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-12-29 11:36:58 +01:00
Andy Scherzinger
946ec09315
Spotbug: don't access Array with constant index
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-12-29 11:36:58 +01:00
Andy Scherzinger
ff3dffd051
Spotbugs: literal string comparison
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-12-29 11:36:57 +01:00
Andy Scherzinger
deada5cf94
Spotbug: remove toString() output concatenation
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-12-29 11:36:57 +01:00
Andy Scherzinger
6cd0481d14
remove unneeded logging statement
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-12-29 11:36:57 +01:00
Andy Scherzinger
7eef68ef36
use proper register-method instead of reflection
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-12-29 11:36:56 +01:00
Andy Scherzinger
7a4785e083
Spotbugs: precize allocation of a collection
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-12-29 11:36:56 +01:00
Andy Scherzinger
698ebdfd1c
remove unneeded toString() call
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-12-29 11:36:56 +01:00
Andy Scherzinger
7261f75549
Spotbugs: remove needless boxing of boolean constant
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-12-29 11:36:52 +01:00
Daniel Calviño Sánchez
4516de4add Remove no longer needed condition
Now that the event is posted only for proximity sensor changes the
condition is no longer needed.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2022-12-28 15:48:46 +01:00
Daniel Calviño Sánchez
5d7b5160b7 Rename PeerConnectionEvent to ProximitySensorEvent
Proximity sensor events should not have been part of
PeerConnectionEvent. However, now that all the peer connection related
properties were removed the remaining event can be renamed to something
more accurate.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2022-12-28 15:48:45 +01:00
Daniel Calviño Sánchez
c8398695f4 Remove no longer needed code after removing EventBus message
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2022-12-28 15:48:45 +01:00
Daniel Calviño Sánchez
34498efa72 Rewrite if/else chain as if/return blocks
Just a matter of preference :-)

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2022-12-28 15:48:45 +01:00
Daniel Calviño Sánchez
04f1679e2a Add observer for peer connections
The observer is just an adapter for the "PeerConnection.Observer"
provided by the WebRTC library; a custom observer is used to expose only
the events needed outside "PeerConnectionWrapper".

For now only the same events that were already handled are taken into
account, but at a later point additional events (like "onAddTrack"
instead of "onAddStream", which is deprecated) could be added too.

Note that the thread used to handle the events has changed; the EventBus
subscriber mode was "MAIN", but as the events were posted from a
PeerConnection observer, which run in a worker thread rather than in the
main thread, the subscriber was executed in the main thread rather than
in the same thread as the poster. Due to this the actions performed by
the handler now must be explicitly run in the main thread.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2022-12-28 15:48:45 +01:00
Daniel Calviño Sánchez
fcbfc1926d Post MediaStreamEvents for each connection state
Rather than simplifying the states to "CONNECTED" and "DISCONNECTED" now
the raw state is posted, and the handler then decides how to treat them
(which, for now, is exactly as before).

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2022-12-28 15:48:45 +01:00
Daniel Calviño Sánchez
337f3d4b5e Extract methods to handle connections and disconnections of peers
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2022-12-28 15:48:45 +01:00
Daniel Calviño Sánchez
4457e92504 Generalize PUBLISHER_FAILED event
Rather than emitting PUBLISHER_FAILED when the publisher connection
fails now PEER_FAILED is emitted when any connection fails, and the
handler checks if the connection was the publisher one to apply the
specific behaviour.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2022-12-28 15:48:45 +01:00
Daniel Calviño Sánchez
64c4f8c7ee Remove unneeded condition
The publisher peer connection when the HPB is used is a sender only
connection, so it never adds or removes a remote stream.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2022-12-28 15:48:45 +01:00
Daniel Calviño Sánchez
30aafed0e8 Post MediaStreamEvent when the stream is actually added
The MediaStreamEvent was posted when the connection with the remote peer
was established. However, the MediaStream is added earlier (as soon as
the remote description is received), so the event is moved to better
reflect that.

Note that checking if the connection is an MCU publisher is no longer
needed, as publisher connections are sender only and therefore no remote
stream is added for publisher connections.

In any case, note that the stream will not start until the connection is
established, and a progress bar will be anyway shown on the
ParticipantDisplayItem until it is connected.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2022-12-28 15:48:45 +01:00
Daniel Calviño Sánchez
29117e8b1b Get user ID from signaling message when creating ParticipantDisplayItem
The user ID set when creating the ParticipantDisplayItem was got from
the join event when the external signaling server was used, and from an
API call when the internal signaling server was used. However, the user
ID is already known from the signaling message that updates the
participant list, and is the one set on the ParticipantDisplayItems
when a participant joins the call. Therefore the other sources are not
needed, so now it is unified to always use the value from the signaling
message.

Note that in the rare cases in which a ParticipantDisplayItem is created
before the participant is seen as in the call the user ID will be
temporary unknown, although it will be automatically fixed once the
participant list update is received. Moreover, even if the other sources
were used it was not guaranteed that the user ID was known, so this
should not be a problem.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2022-12-28 15:48:45 +01:00
Daniel Calviño Sánchez
6e222e7cd2 Create ParticipantDisplayItem when creating the connections
The ParticipantDisplayItem for "video" was created when a participant
joined the room, but the item for "screen" was created when the stream
for the screen was connected. Due to this the item for the remote screen
share just "popped up" once connected, but there was no hint of a
connection being established, like done with the video streams.

Now the ParticipantDisplayItems are created as soon as a
PeerConnectionWrapper is created and then updated as needed (for example
to set the user ID or the stream), which causes the item to immediately
appear and a progress bar to be shown until the connection is
established.

Although the ParticipantDisplayItem may be created on a different thread
(the main thread) than the PeerConnectionWrapper "runOnUiThread"
executes the enqueued messages in order (and it also establishes a
"happens-before" relation with further calls of "runOnUiThread" due to
the internal use of synchronized blocks, although it is not explicitly
documented), so the item will be already created when later updated.

This also holds true when an offer is received even before the
participant is seen as joined (a very rare case that can happen if the
signaling message with the updated participant list is lost for any
reason); the ParticipantDisplayItem is created when the offer is
received and it is later updated with the user ID once a new signaling
message with the updated participant list is received.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2022-12-28 15:48:43 +01:00
Daniel Calviño Sánchez
29d0574667 Create ParticipantDisplayItem on media event if it does not exist yet
Instead of creating a new ParticipantDisplayItem from scratch, which
resets the full grid, now the existing one is updated; a new one is
created only if no item existed already for the session and video stream
type of the media event.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2022-12-28 15:41:46 +01:00
Daniel Calviño Sánchez
dc53023572 Update displayed nick when received in offers or answers
The nick was displayed when updated through a data channel message, or
when a ParticipantDisplayItem was created and the nick was already
received. However, when the HPB is not used the nick is not sent after a
connection is established, as it was sent already in the offer or
answer. The nick from the offer or answer has not been received yet when
the ParticipantDisplayItem is initially created, so the nick only
appeared because a new ParticipantDisplayItem is created again when the
connection is finally established. Due to all that the displayed nick is
now updated as soon as it is received in an offer or answer, which
ensures that the nick is shown independently of when was the
ParticipantDisplayItem created.

Note that this only applies to non-HPB scenarios; when the HPB is used
the nick is got from the participant list update sent through signaling
messages, so it is already known when creating the display item (in some
very strange cases it might happen that an offer is received before the
participant list was updated, but this should not happen, and in any
case it will be handled at a later point).

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2022-12-28 15:41:46 +01:00
Daniel Calviño Sánchez
3762526318 Rewrite if/else chain as if/return blocks
Just a matter of preference :-)

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2022-12-28 11:47:56 +01:00
Daniel Calviño Sánchez
dceb4a6d79 Add listener for data channel messages
For now only the same data channel messages that were already handled
are taken into account, but at a later point the missing messages
("speaking" and "stoppedSpeaking") could be added too.

Note that the thread used to handle the data channel messages has
changed; the EventBus subscriber mode was "MAIN", but as the messages
were posted from a DataChannel observer, which run in a worker thread
rather than in the main thread, the subscriber was executed in the main
thread rather than in the same thread as the poster. Due to this the
actions performed by the handler now must be explicitly run in the main
thread.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2022-12-28 11:47:55 +01:00
Daniel Calviño Sánchez
a65e56a9ce Remove unneeded condition
If the call is a voice only call there will be no received video tracks
(they would have been stopped when each connection is established), so
changing the enabled state has no effect (as the adapter only tries to
show the received video if it is available).

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2022-12-28 11:47:55 +01:00
Daniel Calviño Sánchez
ac4be52b84 Do not guard code that can not throw the caught exception
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2022-12-28 11:47:55 +01:00
Daniel Calviño Sánchez
af514b142a Reorder code that handles nick changed events
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2022-12-28 11:47:55 +01:00
Daniel Calviño Sánchez
81f353f7f0 Return empty display name rather than default nick from web socket
If the display name is not known whether "Guest" or something else needs
to be shown is not a responsibility of the web socket, so now an empty
string is returned instead.

In practice this should not make any difference, though, as the display
name of users is always known as soon as the user joined, and if the
nick of a guest is not known the UI will set it to "Guest".

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2022-12-28 11:47:55 +01:00
Daniel Calviño Sánchez
0dcdd6161f Move nick handling out of PeerConnectionWrapper
PeerConnectionWrappers should not be concerned with the nick of
participants. Moreover, the nick is included in offers and answers due
to legacy reasons and only when the internal signaling server is used.
Due to that the nick was moved out of PeerConnectionWrapper; although
the handling is now different the end result should be the same (there
might be some differences in very specific sequences of events, but in
any case all this is just a temporary step and any leftover issue should
be addressed once call participants and peer connections are split).

As the PeerConnectionWrapper does not keep track of the nick now the
nick changed event is always emitted when a nick changed data channel
message is received, even if the nick did not actually change.
Nevertheless, before it was anyway always emitted if it was for a user
and only when it was for a guest it was emitted only on real changes. In
any case this is not expected to cause any issue (other than some
unneeded view updates, but that will be addressed at a later point by
updating the views only when the model actually changed).

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2022-12-28 11:47:55 +01:00
Daniel Calviño Sánchez
2eac8c2cba Move default nick out of PeerConnectionWrapper
If the nick is not known whether "Guest" or something else needs to be
shown is a responsability of the UI, so now the PeerConnectionWrapper
just returns an empty string and the UI shows the default guest nick if
needed.

Moreover, the nick stored in the PeerConnectionWrapper was not always
correct, as if no nick was received it was returned as "Guest" even
if the connection belonged to a user. Now "Guest" is used only for
actual guests.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2022-12-28 11:47:55 +01:00
Daniel Calviño Sánchez
68cf4ee028 Use generic data channel message instead of nick specific one
The generic data channel message works fine for receiving, but it could
not be used for sending, because the serialization of the payload failed
(the generated JsonMapper did not call 'writeFieldName("payload")',
apparently because the payload was defined as "Any", so there was no
field name set when serializing the payload contents).

It is very likely that the nick data channel message, which has an
explicit payload type and was used only for sending but not for
receiving, was added back in the day just to work around that
limitation. However, due to how the JsonMappers are generated if several
properties with the same name are defined only the first one will be
parsed, and only those with a value will be serialized. This makes
possible to define first a generic payload property and then a payload
property with an explicit type to have a single data channel message
class that can be used both for sending and receiving.

As the nick data channel message is now no longer needed it was removed.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2022-12-28 11:47:55 +01:00
Daniel Calviño Sánchez
faf25f8071 Replace concrete implementation with interface
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2022-12-28 11:47:55 +01:00
Daniel Calviño Sánchez
65ff4efcb9
Send signaling messages directly from PeerConnectionWrapper
Note that the thread used to send the message does not change; the
EventBus subscriber mode was "BACKGROUND", but as the messages were
posted from a WebSocket handler (when requesting offers to the HPB) and
peer connection observers (when sending offers/answers and candidates,
both with and without HPB), which run in worker threads rather than in
the main thread, the subscriber was executed in the same thread as
the poster.

For legacy reasons, when the internal signaling server is used the
offers and answers are expected to also provide the nick of the local
participant. When the external signaling server is used the field can be
included, but it is just ignored and not sent to the other clients. As
the local participant nick is a value unrelated to the peer connection
and is only needed with one type of signaling server the messages are
adjusted as needed before being sent rather than handling this inside
the PeerConnectionWrapper.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2022-12-27 14:28:57 +01:00
Daniel Calviño Sánchez
58e371c98c
Do not apply "toLowerCase()" on already lower case canonical form
The canonical form is already in lower case (see
https://webrtc.googlesource.com/src/+/79d8df02/sdk/android/api/org/webrtc/SessionDescription.java#29),
so there is no need to apply "toLowerCase()".

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2022-12-27 14:28:57 +01:00
Daniel Calviño Sánchez
473b8b238d
Extract interface to send signaling messages
Like done with SignalingMessageReceiver, an implementation specific to
each signaling server type (internal or external) is added.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2022-12-27 14:28:57 +01:00
Daniel Calviño Sánchez
6b032fc55a
Replace constant String of length 1 with character
Fixes UCPM_USE_CHARACTER_PARAMETERIZED_METHOD issue from SpotBugs.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2022-12-27 14:28:57 +01:00
Daniel Calviño Sánchez
4086499a32
Remove special method to request offers
As the "requestoffer" message is just a signaling message the generic
method can be used instead.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2022-12-27 14:28:57 +01:00
Daniel Calviño Sánchez
37db855170
Use generic message rather than specific one for requesting offers
"requestoffer" messages are compatible with the generic messages, so for
simplicity the generic message is used now instead of having specific
classes just for it.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2022-12-27 14:28:56 +01:00
Daniel Calviño Sánchez
95007882f4
Remove no longer used JSON model
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2022-12-27 14:28:56 +01:00
Daniel Calviño Sánchez
48a64fde7e
Fix message wrapper type in documentation
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2022-12-27 14:28:56 +01:00
Daniel Calviño Sánchez
b4d4cdf219
Remove unused wrapper in the internal signaling server
Messages sent to the internal signaling server need to be serialized
twice, first the signaling message and then the wrapper as a whole. Due
to this the NCMessageWrapper was not actually used.

For simplicity the manual serialization was kept rather than adding
something like "NCMessageWrapperToSend" where a serialized signaling
message could be set before serializing it.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2022-12-27 14:28:56 +01:00
Daniel Calviño Sánchez
e1eca7764f
Replace wrapper with actual message in external signaling server
NCMessageWrapper is used only for messages sent and received by the
internal signaling server. However, it is unused by the external
signaling server, except for getting the NCSignalingMessage, which is
the common message for both signaling servers.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2022-12-27 14:28:55 +01:00
Nextcloud bot
5fe33f47a1
Fix(l10n): 🔠 Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-12-27 07:13:47 +00:00
Nextcloud bot
df0baba6e2
Fix(l10n): 🛠️ Update Transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-12-27 07:12:37 +00:00
Nextcloud bot
4e86f450f2
Fix(l10n): 🔠 Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-12-26 06:52:45 +00:00
Nextcloud bot
cd787ae8aa
Fix(l10n): 🛠️ Update Transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-12-26 06:51:52 +00:00
Nextcloud bot
5e276fef80
Fix(l10n): 🔠 Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-12-25 07:52:26 +00:00
Nextcloud bot
7bbac1e823
Fix(l10n): 🛠️ Update Transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-12-25 07:50:59 +00:00
Nextcloud bot
98d6132416
Fix(l10n): 🔠 Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-12-24 09:56:54 +00:00
Nextcloud bot
588a64b778
Fix(l10n): 🛠️ Update Transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-12-24 09:55:01 +00:00
Daniel Calviño Sánchez
c4c64df5a6 Remove no longer needed code after removing EventBus message
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2022-12-23 20:44:41 +01:00
Daniel Calviño Sánchez
5e224c5a24 Use listener for participant list messages
Note that the thread used to handle the participant list messages from
the external signaling server does not change; the EventBus subscriber
mode was "BACKGROUND", but as the message was posted from a WebSocket
handler, which runs in a worker thread rather than in the main thread,
the subscriber was executed in the same thread as the poster.

Also note that the removed "userId" remark was not fully accurate;
although some external signaling messages do actually use "userid" those
currently handled to process the users do not, they always use "userId"
(as documented in the SignalingMessageReceiver).

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2022-12-23 20:44:41 +01:00
Daniel Calviño Sánchez
e0c676bb35 Add listener for participant list messages
For now only the same participant list messages that were already
handled are taken into account, but at a later point further messages,
like participants joining or leaving the conversation, could be added
too.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2022-12-23 20:44:41 +01:00
Daniel Calviño Sánchez
c8e77c3d3b Split message receiver for internal and external signaling servers
Note that the thread used to handle and notify messages from the
external signaling server does not change; the EventBus subscriber mode
was "BACKGROUND", but as the message was posted from a WebSocket
handler, which runs in a worker thread rather than in the main thread,
the subscriber was executed in the same thread as the poster.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2022-12-23 20:44:41 +01:00
Daniel Calviño Sánchez
9df56dccda Process signaling message directly in the SignalingMessageReceiver
This will no longer log an error if the room type of the received
message is neither "video" nor "screen". However, that should never
happen, and it would be useful only while debugging, so it is fine to
lose that.

Note that the check is not added to SignalingMessageReceiver itself to
keep it as generic as possible (and due to the low value of adding it as
explained above). Nevertheless, if needed in the future it would be
possible to add a special listener that receives raw messages in order
to validate them and log the errors, if any.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2022-12-23 20:44:20 +01:00
Daniel Calviño Sánchez
bda7d2719b Add listener for call participant messages
Although "unshareScreen" is technically bound to a specific peer
connection it is instead treated as a general message on the call
participant.

Nevertheless, call participant messages will make possible (at a later
point) to listen to events like "raise hand" or "mute" (which, again,
could be technically bound to a specific peer connection, but at least
for now are treated as a general message on the call participant).

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2022-12-23 20:41:34 +01:00
Daniel Calviño Sánchez
d42fe61e89 Add listener for offer messages
Unlike the WebRtcMessageListener, which is bound to a specific peer
connection, an OfferMessageListener listens to all offer messages, no
matter which peer connection they are bound to. This can be used, for
example, to create a new peer connection when a remote offer for which
there is no previous connection is received.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2022-12-23 20:40:01 +01:00
Daniel Calviño Sánchez
476fb59a08 Use temporary SignalingMessageReceiver implementation in CallActivity
Eventually all signaling related code should be moved to a Signaling
class that abstracts the differences between the internal and external
signaling servers, including how messages are sent and listened to. In
the meantime a temporary SignalingMessageReceiver implementation is
added to CallActivity to be able to start using it.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2022-12-23 20:40:01 +01:00
Daniel Calviño Sánchez
45787caf0a Add SignalingMessageReceiver class to listen to signaling messages
For now only WebRTC messages can be listened to, although it will be
extended with other kinds later.

This commit only introduces the base class, although it is not used yet
anywhere; a concrete implementation will be added in a following commit.

The test class is named "SignalingMessageReceiverWebRtcTest" rather than
just "SignalingMessageReceiverTest" to have smaller, more manageable
test classes for each listener kind rather than one large test class for
all of them.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2022-12-23 20:40:01 +01:00
Daniel Calviño Sánchez
0e36002036 Hide and delete no longer needed public methods
Although the rest of the methods are no longer needed since the handling
of WebRTC messages was moved to PeerConnectionWrapper "setSessionId()"
was not needed even before that.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2022-12-23 20:40:01 +01:00
Daniel Calviño Sánchez
4dffd29ceb Move handling of WebRTC messages to PeerConnectionWrapper
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2022-12-23 20:40:01 +01:00
Daniel Calviño Sánchez
f3e04b8e18 Simplify condition
"peerConnectionWrapper" needs to be defined to enter the if and execute
the switch, so just return before the switch if "peerConnectionWrapper"
is null.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2022-12-23 20:40:01 +01:00
Daniel Calviño Sánchez
075ba20cf9 Split handling of "unshareScreen" and WebRTC messages
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2022-12-23 20:40:01 +01:00
Daniel Calviño Sánchez
7b1bfb2c17 Simplify getting the message type
The message type is set for all signaling messages. On the other hand,
the payload type is only set for offers and answers (and, if the message
was sent by the Android app, also for candidates). However, in all those
cases the payload type just duplicates the message type, so the message
type can be assigned directly rather than falling back to it if there is
no payload type.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2022-12-23 20:39:49 +01:00
Daniel Calviño Sánchez
331bf49f73 Fix processing of participant list on reconnections
When the HPB is used the signaling messages can be received even when
the local participant is not currently in the call (for example, when
starting the call timed out without other participant joining, or when
reconnecting due to the publisher connection failing). Therefore if the
local participant is not in the call it should not try to establish a
connection with the other participants and disconnect them instead.

Moreover, if the connection is tried to be established when not
in the call the HPB will prevent that, and the PeerConnectionWrapper
will stay in a limbo state waiting for an offer to be sent. If the local
participant then joins the call the PeerConnectionWrapper will already
exist for the other participants, so no new connections will be created,
but those previous connections will never be finally established.

Additionally, as the signaling messages can be received before the join
call response the participant list could be received while the call
state is "RECONNECTING" or "PUBLISHER_FAILED". In those cases, as long
as the local participant is already in the call, the participant list
should be processed as if the call state was already "JOINED" (otherwise
the connections were not established either).

For simplicity the participant list is now ignored only when the call
state is "LEAVING"; this means that the participant list would be also
processed in the "CONNECTION_TIMEOUT" state, but the signaling message
should not be received anyway in that case.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2022-12-23 11:00:05 +00:00
Daniel Calviño Sánchez
8cdcc63687 Return without further processing if the call is remotely ended
If the call is hung up with a view shutdown (which finishes the
activity) there is no need to do any further processing on the
participant list.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2022-12-23 11:00:05 +00:00
Daniel Calviño Sánchez
379ec8eae8 Fix call state when join call response is received after signaling
When a call is joined the call flags of the local participant change, so
this causes a signaling message to be sent by the server. When the HPB
is used the signaling message is sent through a WebSocket, which is
already connected before joining the call. Therefore, in some cases the
signaling message can be received through the WebSocket even before the
response to the HTTP "joinCall" request.

If there are other participants in the call the call state is changed to
"IN_CONVERSATION" when the signaling message is processed. However, in
the case described above the call state was then set to "JOINED", which
automatically traverses to "CONNECTION_TIMEOUT" if no other call state
was set in 45 seconds. Due to all this the call was joined and the
connections with the other participants were established, but they were
not visible in the UI (although they could be heard) and after 45
seconds the call was left.

To prevent that now the call state is changed to "JOINED" if it was not
already changed to "IN_CONVERSATION" in the meantime.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2022-12-23 11:00:05 +00:00
Andy Scherzinger
528deb1fb4
Merge pull request #2648 from nextcloud/bugfix/2647/fixNpeProcessAutocompleteUserList
avoid NPE in processAutocompleteUserList
2022-12-23 11:50:43 +01:00
Nextcloud bot
23c64b10f9
Fix(l10n): 🔠 Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-12-23 10:19:11 +00:00
Nextcloud bot
9fec1851b8
Fix(l10n): 🛠️ Update Transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-12-23 10:17:29 +00:00
Marcel Hibbe
d9280d3d98
avoid NPE in processAutocompleteUserList
did not test why this can happen.   autocompleteUser.id must have been null..

Exception java.lang.NullPointerException:
  at com.nextcloud.talk.controllers.ContactsController.processAutocompleteUserList (ContactsController.kt:498)
  at com.nextcloud.talk.controllers.ContactsController.processAutocompleteUserList (ContactsController.kt:482)
  at com.nextcloud.talk.controllers.ContactsController.access$processAutocompleteUserList (ContactsController.kt:90)
  at com.nextcloud.talk.controllers.ContactsController$fetchData$1.onNext (ContactsController.kt:438)
  at com.nextcloud.talk.controllers.ContactsController$fetchData$1.onNext (ContactsController.kt:432)
  at io.reactivex.internal.operators.observable.ObservableRetryPredicate$RepeatObserver.onNext (ObservableRetryPredicate.java:69)
  at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.drainNormal (ObservableObserveOn.java:201)
  at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.run (ObservableObserveOn.java:255)
  at io.reactivex.android.schedulers.HandlerScheduler$ScheduledRunnable.run (HandlerScheduler.java:124)
  at android.os.Handler.handleCallback (Handler.java:883)
  at android.os.Handler.dispatchMessage (Handler.java:100)
  at android.os.Looper.loop (Looper.java:237)
  at android.app.ActivityThread.main (ActivityThread.java:7948)
  at java.lang.reflect.Method.invoke
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:493)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1075)

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-12-23 11:16:53 +01:00
Nextcloud bot
abb88972fd
Fix(l10n): 🔠 Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-12-22 07:12:15 +00:00
Nextcloud bot
67f2815211
Fix(l10n): 🛠️ Update Transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-12-22 07:11:18 +00:00
Nextcloud bot
e8711dfdc4
Fix(l10n): 🔠 Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-12-21 03:54:32 +00:00
Nextcloud bot
400858dee5
Fix(l10n): 🛠️ Update Transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-12-21 03:54:09 +00:00
Nextcloud bot
bd4484a486
Fix(l10n): 🔠 Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-12-20 11:13:10 +00:00
Nextcloud bot
7f2d8bcbd9
Fix(l10n): 🛠️ Update Transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-12-20 11:12:50 +00:00
Nextcloud bot
62079df94e
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-12-20 03:38:36 +00:00
Nextcloud bot
02c51c5032
[tx-robot] Update transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-12-20 03:38:25 +00:00
Álvaro Brey
8bc5735751
RepositoryModule: fix wrong injection for dateUtils
The module class is not supposed to have things injected into it. @Provides-annotated methods
will have their parameters injected, instead.

Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
2022-12-19 17:35:19 +01:00
Andy Scherzinger
54b1427471
Implement closing for file input/output streams
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-12-19 09:37:06 +01:00
Andy Scherzinger
ae6b7156c0
Implement hasCode based on equals() elements to fullfil hasCode/equals contract
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-12-19 09:37:01 +01:00
Nextcloud bot
a4dabd1fed
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-12-19 03:41:01 +00:00
Nextcloud bot
7670a88d51
[tx-robot] Update transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-12-19 03:40:49 +00:00
Nextcloud bot
3b964670c4
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-12-18 03:33:25 +00:00
Nextcloud bot
9974ed59d5
[tx-robot] Update transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-12-18 03:33:13 +00:00
Nextcloud bot
27fa92b7ff
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-12-17 03:34:28 +00:00
Nextcloud bot
62d6a1793f
[tx-robot] Update transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-12-17 03:34:16 +00:00
Nextcloud bot
d8d3847d89
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-12-16 15:05:34 +00:00
Nextcloud bot
6aede24349
[tx-robot] Update transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-12-16 15:05:20 +00:00
Andy Scherzinger
20ad889206
remove unneeded class cast
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-12-15 13:23:06 +01:00
Andy Scherzinger
d858169668
prevent NPE
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-12-15 13:22:47 +01:00
Marcel Hibbe
eff4b912bd
fix Spot Bugs warning
Possible null pointer dereference in com.nextcloud.talk.utils.PushUtils.updatePushStateForUser(Map, User) due to return value of called method

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-12-15 13:11:42 +01:00
Marcel Hibbe
da8148a134
fix spotbug warning "PRMC: Possibly Redundant Method Calls"
PRMC: In class com.nextcloud.talk.utils.ssl.MagicKeyManager
In class com.nextcloud.talk.utils.ssl.MagicKeyManager
In method com.nextcloud.talk.utils.ssl.MagicKeyManager.chooseClientAlias(String[], Principal[], Socket)
At MagicKeyManager.java:[line 68]
Value getCurrentUser()Lio/reactivex/Maybe;
Method com.nextcloud.talk.utils.ssl.MagicKeyManager.chooseClientAlias(String[], Principal[], Socket) appears to call the same method on the same object redundantly

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-12-15 13:11:41 +01:00
Marcel Hibbe
e238c4c9e5
ensure that there is always a current user
this should also fix the app to start after it always crashed on startup because of https://github.com/nextcloud/talk-android/issues/2531

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-12-15 13:11:41 +01:00
Marcel Hibbe
dd155db6ab
rename method to update PushState for a user
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-12-15 13:11:41 +01:00
Álvaro Brey
a37f947eb9
PushUtils: update only pushState when updating users
This is to work around a race condition where this class would asynchronously overwrite other user attributes
with old values after a user switch.

Co-authored-by: Marcel Hibbe <dev@mhibbe.de>
Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
2022-12-15 13:11:40 +01:00
Álvaro Brey
2e2d4a9ca3
CurrentUserProviderImpl: ensure only one observer is set up for all threads
Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
2022-12-15 13:11:40 +01:00
Álvaro Brey
25dd46f95a
UsersDao: fix wrong attribute used in setUserAsActive
Co-authored-by: Marcel Hibbe <dev@mhibbe.de>
Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
2022-12-15 13:11:40 +01:00
Marcel Hibbe
962b1d4e3a
WIP. replace loop to set current state of users by single UPDATE query
i was able to see that the loop was somehow interrupted during debugging which caused two users to have current =true

this should avoid the problem with the loop.

anyway, this doesn't seem to solve the issue completely as i was able to reproduce it again with the new solution. so maybe there are still more methods/scenarios which can cause this.

additionally, i managed to have all users to have current =false with this new query (while switching accounts very fast and often in ChooseAccountDialogFragment..)

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-12-15 13:11:39 +01:00
Marcel Hibbe
f73d1c14fc
add logging and toasts if current user was null
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-12-15 13:11:39 +01:00
Marcel Hibbe
e9dbcc554a
set user.current by value from userAttributes
this should have no effect but it should ensure "current" is not falsely set to true if the method storeProfile will be used for more scenarios in the future.

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-12-15 13:11:39 +01:00
Marcel Hibbe
d4e545e67d
use setUserAsActive instead of userManager.disableAllUsersWithoutId
just refactoring for now. this doesn't solve the bug!

Problem that needs to be solved:
When adding a new Account (User), it is marked as "current", while for the other logged in users "current" must be unset (-> disabled).

The problem is, that for the old active user, "current" is not unset so there were multiple accounts marked as "current".

In the ChooseAccountDialogFragment, only one of the current accounts is shown at the top. Below the set status field, all accounts are listed that are not marked with "current". So as a result, there can be accounts hidden that were marked as "current".

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-12-15 13:11:35 +01:00
Marcel Hibbe
227b7bc080
remove some logging
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-12-15 10:36:23 +01:00
Marcel Hibbe
7745e75f5f
fix to leave room before loading new one
-> add callback methods to ConductorRemapping to execute after chat room was left. Whenever there is a ChatController on top, it's room is now left, before replacing the controller or pushing another one on top.

this avoids problems where entering a chat before the old one was left led to sessionId="0" for the new chat.

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-12-15 10:36:23 +01:00
Marcel Hibbe
c708104cbe
leave room before remap controller
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-12-15 10:36:23 +01:00
Marcel Hibbe
5bc8436cd3
add more logging
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-12-15 10:36:23 +01:00
Marcel Hibbe
85721b5b4f
fix conductor backstack when chat notification is opened
when opening a chat notification, the old chat should not be kept in the backstack. so when clicking the back button when coming from a chat that was opened by a notification, now the ConversationList opens.

by the way, this also avoids to run into bug #2181 (but it's root cause is not solved yet)

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-12-15 10:36:22 +01:00
Marcel Hibbe
943dfa2a83
add logging to examine issue #2181
# reproduce:
1. click in chat where someone is mentioned.
2. click on the mention
3. go back to first chat

# result:
validSessionId() can be false in onDetach for the second chat when going back to first chat
-> leaveRoom is not executed
-> disposable is not disposed
-> getRoomInfo() continues to execute for old controller
-> e.g. appbar infos can be wrong (wrong avatar/title)

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-12-15 10:36:22 +01:00
Andy Scherzinger
2fca50cc9b
Add locale time formatting to system messages
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-12-15 08:55:24 +01:00
Andy Scherzinger
b3836c007f
Localize time formatting for chat messages
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-12-15 08:33:10 +01:00
Andy Scherzinger
96176c4f1c
pass DateUtils instance to viewHolder
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-12-15 08:33:10 +01:00
jld3103
6aece2940e
Localize time formatting
Signed-off-by: jld3103 <jld3103yt@gmail.com>
2022-12-15 08:33:05 +01:00
Nextcloud bot
1cf881bc9a
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-12-15 03:33:21 +00:00
Nextcloud bot
e574fe4718
[tx-robot] Update transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-12-15 03:33:11 +00:00
Nextcloud bot
d4653c2526
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-12-14 03:36:41 +00:00
Nextcloud bot
3c28f87e97
[tx-robot] Update transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-12-14 03:36:31 +00:00
Nextcloud bot
eaee363fb9
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-12-13 03:46:39 +00:00
Nextcloud bot
3e4587af1f
[tx-robot] Update transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-12-13 03:46:28 +00:00
Nextcloud bot
03bcf26e78
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-12-12 03:33:14 +00:00
Nextcloud bot
09135a9582
[tx-robot] Update transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-12-12 03:33:04 +00:00
Nextcloud bot
44d4e03593
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-12-11 03:44:44 +00:00
Nextcloud bot
13088dd793
[tx-robot] Update transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-12-11 03:44:33 +00:00
Nextcloud bot
67f4e5aec1
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-12-10 03:41:03 +00:00
Nextcloud bot
53f3603f87
[tx-robot] Update transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-12-10 03:40:53 +00:00
Nextcloud bot
fd42492f1e
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-12-09 03:49:29 +00:00
Nextcloud bot
950f402aa4
[tx-robot] Update transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-12-09 03:49:18 +00:00
Nextcloud bot
a18ebe1988
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-12-08 03:34:22 +00:00
Nextcloud bot
b86cd51e0a
[tx-robot] Update transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-12-08 03:34:09 +00:00
Marcel Hibbe
7f37a0fe63
fix drawable for link previews
set drawable of referenceThumbImage to null. this hopefully avoids that wrong images are loaded from recycler view to wrong messages

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-12-07 16:44:29 +01:00
Marcel Hibbe
e869108ac7
avoid to set link preview content from wrong message
there was a report that a message contained the link preview of a previous message. This was most likely because of a recycler view error. Hopefully setting empty values should avoid this now.

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-12-07 16:27:45 +01:00
Marcel Hibbe
f74ad91fd8
make link preview messages able to be swiped left
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-12-07 16:27:44 +01:00
Andy Scherzinger
4c614c06ac
Migrate to emoji2
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-12-07 15:59:01 +01:00
Tim Krüger
b0a68e8193
Merge pull request #2613 from nextcloud/bugfix/2612/fixNpeWhenRingtoneSilent
fix crash when joining call while silent ringtone is set
2022-12-07 14:58:34 +01:00
Marcel Hibbe
269844fbc3
simplify logic to close/keep CallNotificationActivity
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-12-07 14:40:52 +01:00
Marcel Hibbe
d33857e603
remove unused code
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-12-07 14:40:52 +01:00
Marcel Hibbe
e121d32984
add check that missed call notification is not shown accidentally
for example when call is hangup on mobile and immediately after on web, the loop in "checkIfCallIsActive" is still active and might trigger to send the "missed call" notification. Because of this, there is now another check if the "ongoing call" notification is still visible. It makes only sense to show the missed call notification, when the ongoing call notification is still visible.

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-12-07 14:40:52 +01:00
Marcel Hibbe
9c4b0a00c6
remove ringtone logic (only make it depend on notification!)
this commit removes the logic to play the ringtone in CallNotificationActivity. Playing ringtone should only be controlled by the notification channel from OS!

furthermore the checks if a call is stopped or is still ongoing etc was removed from CallNotificationActivity. Instead the CallNotificationActivity now is completely dependent on the notification. If the notification is canceled, the Activity stops. If the Notification is ongoing and hangup of accept call is clicked, then the notification is canceled (including the ringtone).

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-12-07 14:40:47 +01:00
Andy Scherzinger
ca63bc52c6
improve lint score
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-12-07 13:46:07 +01:00
Álvaro Brey
2b646845bf
DirectReplyReceiver: fetch avatar in background
Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
2022-12-07 13:46:02 +01:00
Tim Krüger
4b46270362
Set minSdkVersion to 23 (Android 6)
Signed-off-by: Tim Krüger <t@timkrueger.me>
2022-12-07 13:45:57 +01:00
Tim Krüger
49da463971
Replace Fresco with Coil
Fresco is replaced with Coil everywhere to make it possible to set 'minSdkVersion'
to 23. But Coil is not used directly to avoid splintering the dependency
everywhere in the code. Coil is wrapped by extension functions for 'ImageView'.

Some shared functionality is moved from 'DisplayUtils' into the
'ImageViewExtensions'.

The exisiting initialization of Coil has also be changed. The usage of the self
initialized OKHttp client is removed. If this one is added the
caching of the http client is used by Coil additionally to memory and
disk cache.

Resolves: #2227, #2376

Signed-off-by: Tim Krüger <t@timkrueger.me>
2022-12-07 13:45:42 +01:00
Tim Krüger
537f375f86
Convert 'ConverstationItem' from Java to Kotlin
This is mandetory to replace Fresco with Coil.

See: #2376, #2227

Signed-off-by: Tim Krüger <t@timkrueger.me>
2022-12-07 13:44:41 +01:00
Nextcloud bot
d90e52b3cd
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-12-07 03:34:40 +00:00
Nextcloud bot
75e29a4da2
[tx-robot] Update transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-12-07 03:34:29 +00:00
Nextcloud bot
efe1296279
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-12-06 03:42:08 +00:00
Nextcloud bot
8acfb1df4c
[tx-robot] Update transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-12-06 03:41:57 +00:00
Marcel Hibbe
3e6c846d62
fix crash when joining call while silent ringtone is set
E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.nextcloud.talk2, PID: 10874
    java.lang.NullPointerException: uri param can not be null.
        at android.media.MediaPlayer.setDataSource(MediaPlayer.java:1058)
        at android.media.MediaPlayer.setDataSource(MediaPlayer.java:1021)
        at com.nextcloud.talk.activities.CallActivity.playCallingSound(CallActivity.java:2643)

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-12-05 12:51:21 +01:00
Nextcloud bot
4991fcceab
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-12-05 03:30:17 +00:00
Nextcloud bot
d209653202
[tx-robot] Update transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-12-05 03:30:07 +00:00
Nextcloud bot
da4521223a
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-12-04 03:29:36 +00:00
Nextcloud bot
7c3ace1a34
[tx-robot] Update transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-12-04 03:29:26 +00:00
Nextcloud bot
1110d7cecc
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-12-03 03:29:52 +00:00
Nextcloud bot
6a5c0d840f
[tx-robot] Update transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-12-03 03:29:41 +00:00
Marcel Hibbe
8ded97ee03
resolve codacy warnings
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-12-02 14:53:46 +01:00
Marcel Hibbe
3d50075bf2
delete some "magic"
= rename some "Magic*" classes

+ implement reactions for it

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-12-02 14:53:45 +01:00
Marcel Hibbe
6b97197c80
react to given reactions inside message
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-12-02 14:53:45 +01:00
Daniel Calviño Sánchez
6466aaea20 Fix reconnection when the web socket was abruptly closed
When the web socket is abruptly closed it is connected again and the
call is rejoined. However, the call was rejoined in a background thread,
so an exception was thrown when trying to modify the views, which
prevented the call from being joined again.

Besides that the call state needs to be explicitly changed, as if the
web socket was connected again while in a call the state would be
already "JOINED" or "IN_CONVERSATION", which prevents the signaling
settings from being fetched again after the permissions check, and
therefore also prevented the call from being joined again.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2022-12-02 06:51:44 +00:00
Nextcloud bot
d908fcfeab
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-12-02 03:31:11 +00:00
Nextcloud bot
0f23bbb064
[tx-robot] Update transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-12-02 03:31:00 +00:00
Nextcloud bot
3458226d4b
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-12-01 03:35:21 +00:00
Nextcloud bot
6c2d2a1a4a
[tx-robot] Update transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-12-01 03:35:10 +00:00
Marcel Hibbe
12cb7e423b fix to move controllers to top
add logging

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-11-30 12:08:23 +00:00
Marcel Hibbe
a37b0cb4aa delete unnecessary "!!" operators
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-11-30 12:08:23 +00:00
Marcel Hibbe
9af3ffa784 fix order of lock screen timeout in settings
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-11-30 12:08:23 +00:00
Nextcloud bot
f2b4c7a64c
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-11-30 03:35:12 +00:00
Nextcloud bot
a35d1f541f
[tx-robot] Update transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-11-30 03:35:00 +00:00
Nextcloud bot
dfab0109e0
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-11-29 03:35:07 +00:00
Nextcloud bot
657b03d6a4
[tx-robot] Update transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-11-29 03:34:56 +00:00
Nextcloud bot
c3125b669a
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-11-28 03:35:17 +00:00
Nextcloud bot
c715cfeef6
[tx-robot] Update transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-11-28 03:35:06 +00:00
Nextcloud bot
bc95264344
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-11-27 03:33:00 +00:00
Nextcloud bot
e50ea178bc
[tx-robot] Update transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-11-27 03:32:48 +00:00
Nextcloud bot
393a6f674f
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-11-26 03:32:49 +00:00
Nextcloud bot
3a7549a7f4
[tx-robot] Update transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-11-26 03:32:39 +00:00
Nextcloud bot
a3eab50195
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-11-25 08:29:08 +00:00
Nextcloud bot
361d3f06b5
[tx-robot] Update transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-11-25 08:28:56 +00:00