Until now Conversations and Quicksy would only disply the dialog that explains
why we want contact read permissions after the user rejected the request once
(following Android design guidelines and `shouldShowRequestPermissionRationale()`)
However for PlayStore policy this is no longer enough and the app needs to
explain and ask for consent before starting to upload the data.
This commit now displays the explain dialog immediately before asking for the
first time.
Upon accepting a video call on a device that can not establish a video track on
its own (for example by not having a camera), displaying the video enable/disable
button would fail. This commit defaults this button to disabled.
- 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.
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)