Null safety annotations
The @NotNullByDefault annotation marks all fields, methods and parameters in a class or package @NotNull, so Android Studio will warn if values that may be null are used. Please use this annotation for new classes, and specify @Nullable for any fields, methods and parameters that may be null.
Injected fields are initialised to null, so injected classes should use @MethodsNotNullByDefault and @ParametersNotNullByDefault, or specify @Nullable for injected fields.
See merge request !349
Private Group List UI
This MR implements the UI for the list of private groups.
It reacts to three types of events to refresh the displayed data:
* new group message received
* private group added
* private group removed
Missing from final implementation:
* entering groups
* adding new groups
* reacting to a future group dissolved event
* actually removing a dissolved group



Closes#660
See merge request !335
Always show the keyboard when asked for it
The main fix is maintaining the internal keyboard state when the entire view gets hidden, because `onMeasure()` isn't called anymore in that case and can't update it itself.
Closes#676
See merge request !348
Always check whether the context has been destroyed
#551 has the same root cause as #610, which is that when a background operation completes, we need to check whether the activity or fragment that started the operation has been destroyed before doing anything with the UI.
DestroyableActivity has been renamed to DestroyableContext because it's now implemented by some fragments as well. Various existing listener interfaces now extend DestroyableContext.
I also modified the ActivityLifecycleController interface so the activity is passed into the onActivityCreate() method rather than being injected - @ernir please check I haven't broken anything!
Closes#551
See merge request !341
Fix NPE when stopping KeyAgreementTask, improve thread safety
This branch fixes#696 and improves the thread safety of the camera code, mostly by adding @UiThread annotations and occasionally by moving stuff onto the UI thread that might have happened on other threads before.
Closes#696
See merge request !345
Use new group metadata for showing lists
What was supposed to be a minimal change turned into a rather large MR. I did my best to keep things in separate commits, so I can still split this into smaller MRs if desired.
While making use of the new group metadata in the contact and forum list, I noticed some other things in need of improvement to get rid of needing to load all messages:
* Refactor `SharingManager` so its events provide message headers that can be used to update list items
* Add `GroupId` to conversation items, so the metadata of the respective group can be updated as well when marking the items read
* Create a very basic `ConversationManager` so the GroupCount for the various clients can be queried in one go without needing to know all their groups per contact
* Fix a nasty bug that caused forum and blog invitation to not update their read state
* Fix some bugs related to displaying the forum list with proper unread count
Some casual measurements with just a few contacts and messages showed a reduction of the contact list load time by one third.
See merge request !343
Refactor existing adapters into a generic superclass
This MR also moves various blog classes into their own packages and makes the required visibility changes.
Closes#687
See merge request !346
Fix IntroductionManager unit tests
I forgot to run the unit tests after changing the `GroupCount` serialization in response to a review comment. This MR fixes the tests.
See merge request !344
Store message count, unread count and timestamp of latest message in group metadata
This is to eventually address #373 and slowness of other lists. The group metadata is not yet used, but if this MR isn't merged fast, another commit that actually uses it and thus takes care of the slowness will be added.
Closes#584, #585, #586
See merge request !336
Clean up identicon code, remove unused classes
I noticed some debug-level logging coming from the identicon code, went in there to remove it, and realised half the code was unused, so I removed that too.
No functional changes except that the logging is gone and the opacity is now OPAQUE rather than UNKNOWN, which wasn't valid in this context.
See merge request !339
Emoji Support for all user input
All text that can be generated by users will show emoji from the shipped sprites by using the `EmojiTextView` instead of the normal `TextView`.
For all messages and posts, the custom emoji keyboard is now available as well. For this, a new `LargeTextInputView` has been introduced that is a sub-class of `TextInputView`. In order for the emoticon keyboard to work properly the existing views had to be modified heavily, sometimes resulting in new behavior such as scroll views now being above the fixed input field. Actual testing on a device (preferably with a tiny screen) is recommended to make sure this still works as expected. Screenshots will be included at the end of this post.
This MR also disables menu actions rather than hiding them and it includes a fix for a regression that was not showing the keyboard automatically in forums.





Closes#92
See merge request !329
Fix regression in IntroduceeManager
This was happening when the remote response arrives before the local
response is made and thus the local response needs to be send with the
ACK following. The problem was that we ACK was sent before the response
which is not allowed and resulted in the session being aborted by the
introducee. This was happening, because recursion is hard ;)
The fix is only restarting another protocol engine to send the ACK
after the first run has been completed.
An integration test was added to prevent such regression in the future
and to test this code path.
Closes#695
See merge request !338
This was happening when the remote response arrives before the local
response is made and thus the local response needs to be send with the
ACK following. The problem was that we ACK was sent before the response
which is not allowed and resulted in the session being aborted by the
introducee. This was happening, because recursion is hard ;)
The fix is only restarting another protocol engine to send the ACK
after the first run has been completed.
An integration test was added to prevent such regression in the future
and to test this code path.
All text that can be generated by users will show emoji from the
shipped sprites.
For all messages and posts, the custom emoji keyboard is now available.
This also disables menu actions rather than hiding them and thus
closes#677
Included is a fix for a regression that was not showing the keyboard
automatically in forums and thus
closes#676
Create PrivateGroupManager Facade and stub implementation
Some classes were renamed and new base classes introduced in the process. I suggest to expand the "Changed files" before reviewing to get an overview over the changes.
Closes#673
See merge request !332
Fix integration tests
First problem was a race condition with message delivery and the second
one due to the fact that we no longer plan to allow adding of additional
blogs, so the test for that has simply been removed.
See merge request !333
First problem was a race condition with message delivery and the second
one due to the fact that we no longer plan to allow adding of additional
blogs, so the test for that has simply been removed.
Forum controller thread safety and tree safety
This branch solves the concurrent forum issues by code restructure and refactoring.
Closes#556Closes#552
See merge request !262