- In some places, we weren't nulling out references to destroyed objects. This
fixes that.
- (These were all discovered via LeakCanary instrumentation, and the fixes are
hopefully rather straightforward-looking.)
- When the `viewHolder.messageBody` `TextView` created by a `MessageAdapter` is
set to selectable, it leaks an `android.widget.Editor` (because that editor
registers a view observer that never gets unregistered).
- This memory leak is really quite problematic, as the message adapter is used
a lot!
- Having the text be selectable is useless anyway, though; there isn't any way
to select it (because long pressing just opens the context menu anyway).
- It looks like the ListSelectionManager was meant to track selections across
multiple messages. However, I'm not sure this feature ever gets used.
- Accordingly, this commit removes the entire feature, thus fixing the memory
leak (since no `Editor` objects are ever created).
- It should also reduce memory usage in general, since we aren't attaching an
`Editor` to every single textview we create.
- A `TextView` only allocates an `Editor` if you ask it to do certain things,
like make the text selectable or register custom selection callbacks.
leaving a MUC before joining it was a work around for servers that did not treat a
<x/> join as a full join and didn’t send the full user list if they thought the user was
still in the room.
this happens if Conversations restarts after an inproper disconnect. The MUC will think
the user is still in the room.
however nowadays most modern servers will treat <x/> joins as full joins. on the user hand
leave before join would trigger flood prevention on ejabberds and race the first message
with the actual join (making the message arrive before the user is considered in the room)
we don’t want 'manage accounts' and 'settings' to show up when within a conversation.
we also move out disable notifications and add to favorites into an overflow overflow
to make the menu shorter (after adding 'Search messages' it became very crowded)
Conversations would attempt to feed any candidates found in the session-accept into
WebRTC; even if the session wasn’t setup correctly.
this commit processes the candidates only if the session was setup correctly
fixes#3867
JingleRTPConnection shuts down the WebRTCWrapper before transitioning into a terminal state.
(This allows us to make sure it is actually closed when reaching that state);
However that means that, when we get a UI redrawn inbetween closing and transitioning we might
still be in SESSION_ACCEPTED but with no PeerConnection. This traditionally has triggered
an IllegalStateException on getting the EndUserState.
This commit catches the ISE and returns 'ENDING' instead.
Chances are that this is only visibiliy for a very brief time in the UI before the transition
triggers the UI to redraw with the proper state.
fixes#3848