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
When a message is shared, share its transitive dependencies
Like other recursive operations on the dependency graph, this is
not done in a single transaction to prevent an attacker from creating
arbitrary large transactions.
So at startup, the `ValidationManager` finds and resumes any
unfinished operations, by looking for unshared messages with shared
dependents.
Closes#589
See merge request !325
Like other recursive operations on the dependency graph, this is
not done in a single transaction to prevent an attacker from creating
arbitrary large transactions.
So at startup, the `ValidationManager` finds and resumes any
unfinished operations, by looking for shared messages with unshared
dependencies.
Try harder to find suitable camera parameters
This branch fixes QR code scanning on the Galaxy Nexus running Cyanogen Mod 12.1 (Android 5.1.1), without breaking QR code scanning on any of the other test devices.
The problem on the Galaxy Nexus was that the selected scene mode was overriding the selected focus mode, so we asked for continuous picture mode but got macro mode. Macro mode requires startAutoFocus() to be called, but we weren't calling it because we'd asked for continuous picture mode.
The fix for that problem is to query the focus mode after applying the parameters and call startAutoFocus() based on the actual mode rather than the requested mode.
But then I discovered another problem: barcode scene mode was setting the flash to auto, so in low light the flash was turning on and off while trying to scan QR codes. That might work well for printed QR codes, but it's terrible when scanning from a screen.
The fix for the new problem is to select barcode scene mode, then try to disable the flash, and if that fails, reset the scene mode. Then we pick the best available video stabilisation, focus mode and preview size.
On the Galaxy Nexus with CM 12.1, that means we use continuous picture mode instead of barcode scene mode, which works fine. All the other test devices pick the same settings as before.
See merge request !321
Check whether File#listFiles() returns null
The docs say this can happen if there's an I/O error. Also fixed a throw-in-finally-block warning and renamed an IoUtils method to make its contract clearer.
See merge request !328
Remove base32 TODOs, fix a potential NPE
I thought we'd be able to get higher data density in QR codes by using base32 instead of base64, allowing the QR code to use alphanumeric mode instead of byte mode. But I tried it, and although the QR code does use alphanumeric mode, it comes out at exactly the same size (see the 346-use-base32-for-qr-codes branch). So this MR removes the TODOs and fixes a potential NPE I spotted while working on the other branch.
See merge request !327
Recreate cache directory after deleting app data
This fixes a warning on the Moto G:
```
E/libEGL: error creating cache file /data/data/org.briarproject/cache/com.android.opengl.shaders_cache: No such file or directory (2)
```
@grote might possibly be related to hardware rendering issues.
See merge request !326