briar issueshttps://code.briarproject.org/briar/briar/-/issues2018-11-06T15:47:33Zhttps://code.briarproject.org/briar/briar/-/issues/705Race conditions when updating UI from events2018-11-06T15:47:33ZakwizgranRace conditions when updating UI from eventsWhen a UI element can be updated either by loading data from the DB or in response to an event, there's the potential for a race condition that results in stale data being shown:
* DB task loads data from the DB
* DB is updated, event i...When a UI element can be updated either by loading data from the DB or in response to an event, there's the potential for a race condition that results in stale data being shown:
* DB task loads data from the DB
* DB is updated, event is broadcast
* Event handler posts an update to the UI thread
* DB task posts an update to the UI thread, overwriting changes from event
There are a *lot* of race conditions like this in the existing codebase when adding, removing, or updating list items.
The race can be avoided by starting a new DB task from the event handler: the DB executor is single-threaded, so the new task is guaranteed to access the DB and post its update to the UI thread after any existing tasks. But this is inefficient - where possible, it would be nice if we could use the information in the event to update the UI without hitting the DB.Milestone Fakwizgranakwizgranhttps://code.briarproject.org/briar/briar/-/issues/703Create fake test data while using the app2017-10-10T09:16:00ZakwizgranCreate fake test data while using the appWhen testing the app it would be useful to be able to generate fake contacts, groups and messages quickly.
* Add a contact (saving the identity private key somewhere so we can create signed messages later)
* Add 100 private messages to/...When testing the app it would be useful to be able to generate fake contacts, groups and messages quickly.
* Add a contact (saving the identity private key somewhere so we can create signed messages later)
* Add 100 private messages to/from a fake contact
* Add 100 posts to a forum (nested replies from a mixture of throwaway fake identities, fake contacts and the user's own identity)
* Add 100 posts to a blog (comment chains from a mixture of throwaway fake identities, fake contacts and the user's own identity - these could be posted to the blogs of fake contacts or the user's own blog)
Alternatively, instead of creating the messages in batches, we could start a background service that generates them at random intervals until shutdown. That would also allow us to test notifications, UI updates, etc.Android 1.0Torsten GroteTorsten Grotehttps://code.briarproject.org/briar/briar/-/issues/701Refactor message serialisation code out of briar-api2018-06-12T11:32:17ZakwizgranRefactor message serialisation code out of briar-apiThe SharingMessage, BlogSharingMessage and ForumSharingMessage classes in briar-api contain a mixture of interface declaration, serialisation code and factory code. Most of this code should be refactored into briar-core.The SharingMessage, BlogSharingMessage and ForumSharingMessage classes in briar-api contain a mixture of interface declaration, serialisation code and factory code. Most of this code should be refactored into briar-core.Milestone FTorsten GroteTorsten Grotehttps://code.briarproject.org/briar/briar/-/issues/700Update blog backend to match current usage2018-01-28T11:30:28ZakwizgranUpdate blog backend to match current usageThe blog backend supports some features we're not using:
* Multiple blogs per author
* Titles for blogs and posts
* Descriptions for blogs
On the other hand, the backend doesn't provide any support for distinguishing between imported RS...The blog backend supports some features we're not using:
* Multiple blogs per author
* Titles for blogs and posts
* Descriptions for blogs
On the other hand, the backend doesn't provide any support for distinguishing between imported RSS posts and native Briar posts.
We have to balance two concerns: keeping the implementation flexible so that we can add new features, and keeping the implementation simple so it's easier to maintain and audit. Forward compatibility isn't a major concern: we're going to be breaking compatibility in many other ways over the coming months, so keeping the blog protocol forward compatible while everything else breaks won't achieve anything.Milestone FTorsten GroteTorsten Grotehttps://code.briarproject.org/briar/briar/-/issues/698Remove support for anonymous forum posts2018-06-12T11:32:17ZakwizgranRemove support for anonymous forum postsThe UI no longer supports writing anonymous forum posts - we should also remove support from the backend.The UI no longer supports writing anonymous forum posts - we should also remove support from the backend.Milestone FTorsten GroteTorsten Grotehttps://code.briarproject.org/briar/briar/-/issues/697Include commit ID in crash reports and feedback2018-06-12T11:32:17ZakwizgranInclude commit ID in crash reports and feedback1. Include the commit ID in BuildConfig as follows: http://stackoverflow.com/a/35041457
2. Get the commit ID from BuildConfig at runtime and include it in the custom data provided to ACRA1. Include the commit ID in BuildConfig as follows: http://stackoverflow.com/a/35041457
2. Get the commit ID from BuildConfig at runtime and include it in the custom data provided to ACRAMilestone FTorsten GroteTorsten Grotehttps://code.briarproject.org/briar/briar/-/issues/696NPE when stopping KeyAgreementTask2018-06-12T11:32:17ZakwizgranNPE when stopping KeyAgreementTaskThis comes from the attached crash report:
```
10-01 13:32:55.236 E/ACRA (12071): ACRA caught a NullPointerException for org.briarproject.unofficial
10-01 13:32:55.236 E/ACRA (12071): java.lang.NullPointerException: Attempt to i...This comes from the attached crash report:
```
10-01 13:32:55.236 E/ACRA (12071): ACRA caught a NullPointerException for org.briarproject.unofficial
10-01 13:32:55.236 E/ACRA (12071): java.lang.NullPointerException: Attempt to invoke interface method 'void org.briarproject.api.keyagreement.KeyAgreementTask.stopListening()' on a null object reference
10-01 13:32:55.236 E/ACRA (12071): at org.briarproject.android.keyagreement.ShowQrCodeFragment$3.run(ShowQrCodeFragment.java:192)
```
The user has customised the package name and version number, so there may be other modifications.
[report-5444258362477720692.json](/uploads/c9cd2a9bab424cbf12f00a143f5a8ced/report-5444258362477720692.json)Milestone Eakwizgranakwizgranhttps://code.briarproject.org/briar/briar/-/issues/695Introduction failure2018-06-12T11:32:17ZakwizgranIntroduction failure* Set up three devices (Ace, Moto and Sony)
* Ace and Moto add each other as contacts
* Sony and Moto add each other as contacts
* Moto introduces Ace to Sony
* Sony accepts
* Ace accepts
* Moto receives Ace's ack and enters the error st...* Set up three devices (Ace, Moto and Sony)
* Ace and Moto add each other as contacts
* Sony and Moto add each other as contacts
* Moto introduces Ace to Sony
* Sony accepts
* Ace accepts
* Moto receives Ace's ack and enters the error state
The problem seems to be that Moto is receiving Ace's ack before Ace's response.
Log from Ace:
```
10-04 15:52:45.613 5426-5522/org.briarproject I/IntroduceeEngine: Received Introduction in state AWAIT_REQUEST from Moto with session ID -652500394 in group -1226669137. Moving on to state AWAIT_RESPONSES
10-04 15:52:54.622 5426-5522/org.briarproject I/IntroduceeEngine: Received Response in state AWAIT_RESPONSES from Moto related to Sony with session ID -652500394 in group -1226669137. Moving on to state AWAIT_LOCAL_RESPONSE
10-04 15:52:56.074 5426-5522/org.briarproject I/IntroduceeEngine: Sending accept response in state AWAIT_LOCAL_RESPONSE to Moto for Sony with session ID -652500394 in group -1226669137. Moving on to state AWAIT_ACK
10-04 15:52:58.426 5426-5522/org.briarproject I/IntroduceeManager: Adding contact in inactive state
10-04 15:52:58.876 5426-5522/org.briarproject I/IntroduceeEngine: Sending ACK to Moto for Sony with session ID -652500394 in group -1226669137
10-04 15:53:01.330 5426-5522/org.briarproject I/IntroduceeEngine: Received Abort in state AWAIT_ACK from Moto related to Sony with session ID -652500394 in group -1226669137. Moving on to state ERROR
```
Log from Moto:
```
10-04 15:52:00.776 9254-9993/org.briarproject I/IntroducerEngine: Sending introduction request in state PREPARE_REQUESTS to Ace with session ID -652500394 in group -1226669137. Moving on to state AWAIT_RESPONSES
10-04 15:52:00.776 9254-9993/org.briarproject I/IntroducerEngine: Sending introduction request in state PREPARE_REQUESTS to Sony with session ID -652500394 in group -1923720712. Moving on to state AWAIT_RESPONSES
10-04 15:52:10.336 9254-9993/org.briarproject I/IntroducerEngine: Received Response in state AWAIT_RESPONSES from Sony to Ace with session ID -652500394 in group -1923720712. Moving on to state AWAIT_RESPONSE_1
10-04 15:52:10.337 9254-9993/org.briarproject I/IntroducerEngine: Forwarding message to group -1226669137
10-04 15:52:16.592 9254-9993/org.briarproject I/IntroducerEngine: Received ACK in state AWAIT_RESPONSE_1 from Ace to Sony with session ID -652500394 in group -1226669137. Moving on to state ERROR
10-04 15:52:16.592 9254-9993/org.briarproject W/IntroducerEngine: Aborting protocol session -652500394 in state AWAIT_RESPONSE_1
10-04 15:52:16.727 9254-9993/org.briarproject I/IntroducerEngine: Received Response in state ERROR from Ace to Sony with session ID -652500394 in group -1226669137. Moving on to state ERROR
```
Log from Sony:
```
10-04 15:52:46.079 2996-3845/org.briarproject I/IntroduceeEngine: Received Introduction in state AWAIT_REQUEST from Moto with session ID -652500394 in group -1923720712. Moving on to state AWAIT_RESPONSES
10-04 15:52:52.329 2996-3845/org.briarproject I/IntroduceeEngine: Sending accept response in state AWAIT_RESPONSES to Moto for Ace with session ID -652500394 in group -1923720712. Moving on to state AWAIT_REMOTE_RESPONSE
10-04 15:53:02.029 2996-3845/org.briarproject I/IntroduceeEngine: Received Abort in state AWAIT_REMOTE_RESPONSE from Moto related to Ace with session ID -652500394 in group -1923720712. Moving on to state ERROR
```Milestone ETorsten GroteTorsten Grotehttps://code.briarproject.org/briar/briar/-/issues/694NPE in ShareActivity when going back2018-06-12T11:32:17ZTorsten GroteNPE in ShareActivity when going back```
java.lang.NullPointerException: Attempt to invoke virtual method 'int java.util.ArrayList.size()' on a null object reference
at org.briarproject.android.sharing.ShareActivity.getContactsFromIntegers(Sha...```
java.lang.NullPointerException: Attempt to invoke virtual method 'int java.util.ArrayList.size()' on a null object reference
at org.briarproject.android.sharing.ShareActivity.getContactsFromIntegers(ShareActivity.java:85)
at org.briarproject.android.sharing.ContactSelectorFragment.onCreateView(ContactSelectorFragment.java:125)
at android.support.v4.app.Fragment.performCreateView(Fragment.java:1974)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1067)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1252)
at android.support.v4.app.BackStackRecord.popFromBackStack(BackStackRecord.java:971)
at android.support.v4.app.FragmentManagerImpl.popBackStackState(FragmentManager.java:1670)
at android.support.v4.app.FragmentManagerImpl.popBackStackImmediate(FragmentManager.java:586)
at android.support.v4.app.FragmentActivity.onBackPressed(FragmentActivity.java:189)
at org.briarproject.android.sharing.ShareMessageFragment.onOptionsItemSelected(ShareMessageFragment.java:100)
at org.briarproject.android.sharing.ShareForumMessageFragment.onOptionsItemSelected(ShareForumMessageFragment.java:23)
```Milestone ETorsten GroteTorsten Grotehttps://code.briarproject.org/briar/briar/-/issues/693Introduction layout is too large for small screens2018-06-12T11:32:17ZakwizgranIntroduction layout is too large for small screensThe screenshots come from the Sony Xperia Tipo (Android 4.0.4, 320x480 screen).
![device-2016-10-04-164340](/uploads/47345203b5e678fce60552ce027adb46/device-2016-10-04-164340.png)
![device-2016-10-04-164449](/uploads/dc158c908b59d7edbe...The screenshots come from the Sony Xperia Tipo (Android 4.0.4, 320x480 screen).
![device-2016-10-04-164340](/uploads/47345203b5e678fce60552ce027adb46/device-2016-10-04-164340.png)
![device-2016-10-04-164449](/uploads/dc158c908b59d7edbe4f7f99bb94e5d8/device-2016-10-04-164449.png)
Suggested solution: remove the "You can compose..." message, replace the text field's hint text with "Add a message (optional)", reduce the sizes of the avatars and/or put the nicknames next to the avatars.https://code.briarproject.org/briar/briar/-/issues/692Forum/blog sharing layout is too large for small screens2019-02-25T10:03:19ZakwizgranForum/blog sharing layout is too large for small screensThe screenshot comes from the Sony Xperia Tipo (Android 4.0.4, 320x480 screen).
![device-2016-10-04-155033](/uploads/b5f3f5b4c2ef7fd007e4df0603384e9a/device-2016-10-04-155033.png)
Suggested solution: remove the "You may compose..." mes...The screenshot comes from the Sony Xperia Tipo (Android 4.0.4, 320x480 screen).
![device-2016-10-04-155033](/uploads/b5f3f5b4c2ef7fd007e4df0603384e9a/device-2016-10-04-155033.png)
Suggested solution: remove the "You may compose..." message, replace the text field's hint text with "Add a message (optional)".https://code.briarproject.org/briar/briar/-/issues/690Introduction onboarding is shown again if it's dismissed2018-06-12T11:32:17ZakwizgranIntroduction onboarding is shown again if it's dismissedIf I tap outside the tap target to dismiss the onboarding, it's shown again next time I open the screen.If I tap outside the tap target to dismiss the onboarding, it's shown again next time I open the screen.Milestone ETorsten GroteTorsten Grotehttps://code.briarproject.org/briar/briar/-/issues/688ProGuard warns about missing descriptor classes2018-06-12T11:32:17ZakwizgranProGuard warns about missing descriptor classesFor some of the emoji classes, ProGuard warns that "the configuration keeps the entry point, but not the descriptor class". The ProGuard docs say this can be fixed by adding `includedescriptorclasses` to the `-keep` argument.
http://pro...For some of the emoji classes, ProGuard warns that "the configuration keeps the entry point, but not the descriptor class". The ProGuard docs say this can be fixed by adding `includedescriptorclasses` to the `-keep` argument.
http://proguard.sourceforge.net/manual/troubleshooting.html#descriptorclassMilestone ETorsten GroteTorsten Grotehttps://code.briarproject.org/briar/briar/-/issues/687Refactor existing adapters into a generic superclass2018-06-12T11:32:17ZTorsten GroteRefactor existing adapters into a generic superclassWe have a lot of adapters with very similar methods for managing their sorted lists - a lot of this could probably be refactored into a generic superclass.We have a lot of adapters with very similar methods for managing their sorted lists - a lot of this could probably be refactored into a generic superclass.Milestone ETorsten GroteTorsten Grotehttps://code.briarproject.org/briar/briar/-/issues/686Crash when transitioning out of ReblogActivity2018-06-12T11:32:17ZakwizgranCrash when transitioning out of ReblogActivitySteps to reproduce:
* Write a few blog posts, so your first post scrolls off-screen
* Reblog your first post
The crash occurs during the transition back to FeedFragment. The stack trace isn't very helpful:
```
09-29 17:36:03.692 19559-1...Steps to reproduce:
* Write a few blog posts, so your first post scrolls off-screen
* Reblog your first post
The crash occurs during the transition back to FeedFragment. The stack trace isn't very helpful:
```
09-29 17:36:03.692 19559-19559/org.briarproject E/ACRA: ACRA caught a NullPointerException for org.briarproject
java.lang.NullPointerException: Attempt to invoke virtual method 'int android.view.ViewGroup.getScrollX()' on a null object reference
at android.app.ActivityTransitionCoordinator.setSharedElementState(ActivityTransitionCoordinator.java:488)
at android.app.ActivityTransitionCoordinator.setSharedElementState(ActivityTransitionCoordinator.java:565)
at android.app.EnterTransitionCoordinator.startSharedElementTransition(EnterTransitionCoordinator.java:329)
at android.app.EnterTransitionCoordinator.access$100(EnterTransitionCoordinator.java:41)
at android.app.EnterTransitionCoordinator$5$1.run(EnterTransitionCoordinator.java:396)
at android.app.ActivityTransitionCoordinator.startTransition(ActivityTransitionCoordinator.java:794)
at android.app.EnterTransitionCoordinator$5.onPreDraw(EnterTransitionCoordinator.java:393)
at android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:944)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2000)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1084)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5990)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:767)
at android.view.Choreographer.doCallbacks(Choreographer.java:580)
at android.view.Choreographer.doFrame(Choreographer.java:550)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:753)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5343)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:905)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:700)
```Milestone ETorsten GroteTorsten Grotehttps://code.briarproject.org/briar/briar/-/issues/685IllegalArgumentException: String is shorter than TEASER_LENGTH2018-12-19T12:22:43ZakwizgranIllegalArgumentException: String is shorter than TEASER_LENGTH```
09-29 14:47:30.602 16471-16471/? E/ACRA: ACRA caught a IllegalArgumentException for org.briarproject
java.lang.IllegalArgumentException: String is shorter than TEASER_LENGTH
at org.briarproject.android.util.AndroidUtils.getTe...```
09-29 14:47:30.602 16471-16471/? E/ACRA: ACRA caught a IllegalArgumentException for org.briarproject
java.lang.IllegalArgumentException: String is shorter than TEASER_LENGTH
at org.briarproject.android.util.AndroidUtils.getTeaser(AndroidUtils.java:130)
at org.briarproject.android.blogs.BlogPostViewHolder.bindItem(BlogPostViewHolder.java:122)
at org.briarproject.android.blogs.BlogPostAdapter.onBindViewHolder(BlogPostAdapter.java:73)
at org.briarproject.android.blogs.BlogPostAdapter.onBindViewHolder(BlogPostAdapter.java:14)
```
The crash is caused by checking the length of the text before spanning, then passing in the spanned text, which is apparently shorter. Should be an easy fix.Milestone Eakwizgranakwizgranhttps://code.briarproject.org/briar/briar/-/issues/684Inject EmojiProvider2018-09-03T12:14:34ZakwizgranInject EmojiProviderInject a singleton EmojiProvider so we can get rid of the static instance. (It needs to be a singleton because it loads the emoji bitmaps and keeps references to them.)Inject a singleton EmojiProvider so we can get rid of the static instance. (It needs to be a singleton because it loads the emoji bitmaps and keeps references to them.)Android 1.1akwizgranakwizgranhttps://code.briarproject.org/briar/briar/-/issues/683Refactor forum UI to improve asymptotic performance2018-06-12T11:32:17ZakwizgranRefactor forum UI to improve asymptotic performanceNestedForumAdapter has some methods that run in O(N\^2) time. Refactor the forum code so we don't need nested loops to calculate things like visibility and descendent counts.NestedForumAdapter has some methods that run in O(N\^2) time. Refactor the forum code so we don't need nested loops to calculate things like visibility and descendent counts.https://code.briarproject.org/briar/briar/-/issues/682Test effect of touching forum entries while they're collapsing/expanding2018-06-12T11:32:17ZakwizgranTest effect of touching forum entries while they're collapsing/expandingWrite UI tests that generate touch events for forum entries during the expand/collapse animations, to ensure the NestedForumAdapter logic for assigning positions to visible elements doesn't have any corner cases for elements that are in ...Write UI tests that generate touch events for forum entries during the expand/collapse animations, to ensure the NestedForumAdapter logic for assigning positions to visible elements doesn't have any corner cases for elements that are in the process of expanding/collapsing.https://code.briarproject.org/briar/briar/-/issues/681Convert forum post bodies to strings, remove content type2018-06-12T11:32:17ZakwizgranConvert forum post bodies to strings, remove content typeMilestone ETorsten GroteTorsten Grote